summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2017-02-11 15:40:34 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2017-02-11 15:40:34 +0800
commit8ac177318bab17f91ea10c1aef0be38cd8239e8e (patch)
tree11ca26a6c1120b39d889fe1b82479acf9037cc0e
parent419c996d4e5561de2de6f9b02dcb399865c3fc05 (diff)
Add port call of vimdriver
Change-Id: Id5bb0229edfc63ccb221e8131a8a24d1b5366c67 Issue-Id: GVNFM-32 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/lcm/pub/vimapi/api.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/lcm/lcm/pub/vimapi/api.py b/lcm/lcm/pub/vimapi/api.py
index a23ee8da..1cdb0273 100644
--- a/lcm/lcm/pub/vimapi/api.py
+++ b/lcm/lcm/pub/vimapi/api.py
@@ -59,3 +59,27 @@ def get_subnet(vim_id, subnet_id):
def list_subnet(vim_id):
return call(vim_id, "subnets", "GET")
+
+def create_port(vim_id, data):
+ return call(vim_id, "ports", "POST", data)
+
+def delete_port(vim_id, port_id):
+ return call(vim_id, "ports/%s" % port_id, "DELETE")
+
+def get_port(vim_id, port_id):
+ return call(vim_id, "ports/%s" % port_id, "GET")
+
+def list_port(vim_id):
+ return call(vim_id, "ports", "GET")
+
+def create_flavor(vim_id, data):
+ return call(vim_id, "flavors", "POST", data)
+
+def delete_flavor(vim_id, flavor_id):
+ return call(vim_id, "flavors/%s" % flavor_id, "DELETE")
+
+def get_flavor(vim_id, flavor_id):
+ return call(vim_id, "flavors/%s" % flavor_id, "GET")
+
+def list_flavor(vim_id):
+ return call(vim_id, "flavors", "GET")