- Timestamp:
- Dec 8, 2009 5:02:24 PM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 3bddd24
- Parents:
- 7b26c39
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/fedd_client.py
r7b26c39 r7d2814a 65 65 version="0.1") 66 66 67 self.add_option("- c","--cert", action="store", dest="cert",67 self.add_option("--cert", action="store", dest="cert", 68 68 type="string", help="my certificate file") 69 self.add_option( "-d","--debug", action="count", dest="debug",69 self.add_option( "--debug", action="count", dest="debug", 70 70 default=0, help="Set debug. Repeat for more information") 71 self.add_option("- s", "--serializeOnly", action="store_true",71 self.add_option("--serializeOnly", action="store_true", 72 72 dest="serialize_only", default=False, 73 73 help="Print the SOAP request that would be sent and exit") 74 self.add_option("- T","--trusted", action="store", dest="trusted",74 self.add_option("--trusted", action="store", dest="trusted", 75 75 type="string", help="Trusted certificates (required)") 76 self.add_option("- u", "--url", action="store", dest="url",76 self.add_option("--url", action="store", dest="url", 77 77 type="string",default="https://localhost:23235", 78 78 help="URL to connect to (default %default)") 79 self.add_option("- x","--transport", action="store", type="choice",79 self.add_option("--transport", action="store", type="choice", 80 80 choices=("xmlrpc", "soap"), default="soap", 81 81 help="Transport for request (xmlrpc|soap) (Default: %default)") … … 85 85 def __init__(self): 86 86 fedd_client_opts.__init__(self) 87 self.add_option("- e", "--experiment_cert", dest="out_certfile",87 self.add_option("--experiment_cert", dest="out_certfile", 88 88 type="string", help="output certificate file") 89 self.add_option("- E", "--experiment_name", dest="exp_name",89 self.add_option("--experiment_name", dest="exp_name", 90 90 type="string", help="Suggested experiment name") 91 91 … … 94 94 add_cert_callback=None): 95 95 fedd_client_opts.__init__(self) 96 self.add_option("- e", "--experiment_cert", dest="out_certfile",96 self.add_option("--experiment_cert", dest="out_certfile", 97 97 type="string", help="output certificate file") 98 self.add_option("- E", "--experiment_name", dest="exp_name",98 self.add_option("--experiment_name", dest="exp_name", 99 99 type="string", help="Suggested experiment name") 100 self.add_option("- F","--useFedid", action="store_true",100 self.add_option("--useFedid", action="store_true", 101 101 dest="use_fedid", default=False, 102 102 help="Use a fedid derived from my certificate as user identity") 103 self.add_option("- f", "--file", dest="file",103 self.add_option("--file", dest="file", 104 104 help="experiment description file") 105 self.add_option("- p", "--project", action="store", dest="project",105 self.add_option("--project", action="store", dest="project", 106 106 type="string", 107 107 help="Project to export from master") 108 108 if add_key_callback: 109 self.add_option("- k", "--ssh_key", action="callback",109 self.add_option("--ssh_key", action="callback", 110 110 type="string", callback=add_key_callback, 111 111 callback_args=(access_keys,), 112 112 help="ssh key for access (can be supplied more than once") 113 113 if add_cert_callback: 114 self.add_option("- K", "--x509Key", action="callback",114 self.add_option("--x509Key", action="callback", 115 115 type="string", callback=add_cert_callback, 116 116 callback_args=(access_keys,), 117 117 help="X509 certificate for access " + \ 118 118 "(can be supplied more than once") 119 self.add_option("- m", "--master", dest="master",119 self.add_option("--master", dest="master", 120 120 help="Master testbed in the federation") 121 self.add_option("- U", "--username", action="store", dest="user",121 self.add_option("--username", action="store", dest="user", 122 122 type="string", help="Use this username instead of the uid") 123 123 … … 127 127 fedd_create_opts.__init__(self, access_keys, add_key_callback, 128 128 add_cert_callback) 129 self.add_option('- t','--fedkit', action='store_true', dest='fedkit',129 self.add_option('--fedkit', action='store_true', dest='fedkit', 130 130 default=False, 131 131 help="get output suitable for federation kit install") 132 self.add_option('- G','--gatewaykit', action='store_true',132 self.add_option('--gatewaykit', action='store_true', 133 133 dest='gatewaykit', default=False, 134 134 help="get output suitable for federation gateway kit install") … … 140 140 fedd_create_opts.__init__(self, access_keys, add_key_callback, 141 141 add_cert_callback) 142 self.add_option("- a","--anonymous", action="store_true",142 self.add_option("--anonymous", action="store_true", 143 143 dest="anonymous", default=False, 144 144 help="Do not include a user in the request") 145 self.add_option("- l","--label", action="store", dest="label",145 self.add_option("--label", action="store", dest="label", 146 146 type="string", help="Label for output") 147 147 if add_node_callback: 148 self.add_option("- n", "--node", action="callback", type="string",148 self.add_option("--node", action="callback", type="string", 149 149 callback=add_node_callback, callback_args=(node_descs,), 150 150 help="Node description: image:hardware[:count]") 151 self.add_option("- t", "--testbed", action="store", dest="testbed",151 self.add_option("--testbed", action="store", dest="testbed", 152 152 type="string", 153 153 help="Testbed identifier (URI) to contact (required)") … … 156 156 def __init__(self): 157 157 fedd_client_opts.__init__(self) 158 self.add_option("- e", "--experiment_cert", dest="exp_certfile",158 self.add_option("--experiment_cert", dest="exp_certfile", 159 159 type="string", help="experiment certificate file") 160 self.add_option("- E", "--experiment_name", dest="exp_name",160 self.add_option("--experiment_name", dest="exp_name", 161 161 type="string", help="human readable experiment name") 162 162 self.add_option("--data", dest="data", default=[], … … 188 188 def __init__(self): 189 189 fedd_client_opts.__init__(self) 190 self.add_option("- e", "--experiment_cert", dest="exp_certfile",190 self.add_option("--experiment_cert", dest="exp_certfile", 191 191 type="string", help="experiment name certificate file") 192 self.add_option("- E", "--experiment_name", dest="exp_name",192 self.add_option("--experiment_name", dest="exp_name", 193 193 type="string", help="human readable experiment name") 194 194 self.add_option("--logfile", dest="logfile", default=None, … … 200 200 def __init__(self): 201 201 fedd_exp_data_opts.__init__(self) 202 self.add_option("- o", "--output", dest="outfile", type="string",202 self.add_option("--output", dest="outfile", type="string", 203 203 help="output image file") 204 self.add_option("- F", "--format", dest="format", type="choice",204 self.add_option("--format", dest="format", type="choice", 205 205 choices=("jpg", "png", "dot", "svg"), 206 206 help="Output file format override") 207 self.add_option("- P", "--program", dest="neato", default=None,207 self.add_option("--program", dest="neato", default=None, 208 208 type="string", 209 209 help="Program compatible with dot (from graphviz) used to " + \ 210 210 "render image") 211 self.add_option( '-L',"--labels", dest='labels', action='store_true',211 self.add_option("--labels", dest='labels', action='store_true', 212 212 default=True, help='Label nodes and edges') 213 self.add_option( '-A',"--no_labels", dest='labels',213 self.add_option("--no_labels", dest='labels', 214 214 default=True, action='store_false', 215 215 help='Label nodes and edges') 216 self.add_option('- j','--pixels', dest="pixels", default=None,216 self.add_option('--pixels', dest="pixels", default=None, 217 217 type="int", 218 218 help="Size of output in pixels (diagrams are square") … … 223 223 fedd_split_opts.__init__(self, access_keys, add_key_callback, 224 224 add_cert_callback) 225 self.add_option("- o", "--output", dest="outfile", type="string",225 self.add_option("--output", dest="outfile", type="string", 226 226 help="output image file") 227 self.add_option("- Q", "--format", dest="format", type="choice",227 self.add_option("--format", dest="format", type="choice", 228 228 choices=("jpg", "png", "dot", "svg"), 229 229 help="Output file format override") 230 self.add_option("- P", "--program", dest="neato", default=None,230 self.add_option("--program", dest="neato", default=None, 231 231 type="string", 232 232 help="Program compatible with dot (from graphviz) used to " + \ 233 233 "render image") 234 self.add_option( '-L',"--labels", dest='labels', action='store_true',234 self.add_option("--labels", dest='labels', action='store_true', 235 235 default=True, help='Label nodes and edges') 236 self.add_option( '-A',"--no_labels", dest='labels',236 self.add_option("--no_labels", dest='labels', 237 237 default=True, action='store_false', 238 238 help='Label nodes and edges') 239 self.add_option('- j','--pixels', dest="pixels", default=None,239 self.add_option('--pixels', dest="pixels", default=None, 240 240 type="int", 241 241 help="Size of output in pixels (diagrams are square") … … 244 244 def __init__(self): 245 245 fedd_client_opts.__init__(self) 246 self.add_option("- f", "--file", dest="file",246 self.add_option("--file", dest="file", 247 247 help="experiment description file") 248 248 … … 1500 1500 for id in eid: 1501 1501 for k in id.keys(): 1502 print "%s: %s" % (k, id[k])1503 1502 if k =='fedid': 1504 1503 e_fedid = id[k] 1505 1504 elif k =='localname': 1506 1505 e_local = id[k] 1507 1508 st = resp_dict.get('experimentStatus', None)1509 if st:1510 print "status: %s" % st1511 1512 1506 1513 1507 msg = {
Note: See TracChangeset
for help on using the changeset viewer.