X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fcli%2Frest%2Fcompute.py;h=4a20ca94978ace7044d1f37a2ad406dfdb327f11;hb=0a336cc612849715b03a513a7b4668d30542b5d6;hp=bdef0ec10c3f6ae7d6f5c6a016d1a4138d7286f9;hpb=20fa2218b8d2915d5c95443b74af950709bbbd62;p=osm%2Fvim-emu.git diff --git a/src/emuvim/cli/rest/compute.py b/src/emuvim/cli/rest/compute.py old mode 100644 new mode 100755 index bdef0ec..4a20ca9 --- a/src/emuvim/cli/rest/compute.py +++ b/src/emuvim/cli/rest/compute.py @@ -27,19 +27,20 @@ class RestApiClient(): 'command':args.get("docker_command"), 'network':nw_list} - responce = put("%s/restapi/compute/%s/%s/start" % + response = put("%s/restapi/compute/%s/%s/start" % (args.get("endpoint"), args.get("datacenter"), args.get("name")), json = json.dumps(req)) - pp.pprint(responce.json()) + pp.pprint(response.json()) + def stop(self, args): - responce = get("%s/restapi/compute/%s/%s/stop" % + response = get("%s/restapi/compute/%s/%s/stop" % (args.get("endpoint"), args.get("datacenter"), args.get("name"))) - pp.pprint(responce.json()) + pp.pprint(response.json()) def list(self,args): @@ -120,7 +121,7 @@ parser.add_argument( '(id=input,ip=10.0.10.3/24),(id=output,ip=10.0.10.4/24)' for multiple interfaces.") parser.add_argument( "--endpoint", "-e", dest="endpoint", - default="http://127.0.0.1:5000", + default="http://127.0.0.1:5001", help="UUID of the plugin to be manipulated.") def main(argv):