summaryrefslogtreecommitdiffstats
path: root/vio
diff options
context:
space:
mode:
authorLi Xinhui <lxinhui@vmware.com>2018-04-06 16:23:16 +0800
committerLi Xinhui <lxinhui@vmware.com>2018-04-06 16:23:16 +0800
commite7271a18c5f6707472be8d576e8a52c0201d7e21 (patch)
tree1d72fb26d8f903cc7c84c89b2bd2412ef50cabd8 /vio
parent1c64622df18026119b9746631191cccc3dc56425 (diff)
Small changes to clean the annotations
Change-Id: I3ce61c3a8fce5e3afc90adde8b3a8badf2f6f487 Issue-ID: MULTICLOUD-152 Signed-off-by: Xinhui Li <lxinhui@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r--vio/vio/api_v2/api_router/controller_builder.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/vio/vio/api_v2/api_router/controller_builder.py b/vio/vio/api_v2/api_router/controller_builder.py
index a3c70b2..f910aaf 100644
--- a/vio/vio/api_v2/api_router/controller_builder.py
+++ b/vio/vio/api_v2/api_router/controller_builder.py
@@ -27,7 +27,7 @@ OBJ_IN_ARRAY = "(\w+)\[(\d+)\]\.(\w+)"
def _get_vim_auth_session(vim_id, tenant_id):
- """ Get the auth session to backend VIM """
+ """ Get the auth session to the given backend VIM """
try:
vim = extsys.get_vim_by_id(vim_id)
@@ -136,13 +136,13 @@ def _build_api_controller(api_meta):
service_type = path_meta["vim_path"][1:delimiter]
resource_url = path_meta["vim_path"][delimiter:]
- # Assume that only one resource
+ # Assume there is only one resource.
name, resource_meta = api_meta['definitions'].items()[0]
resource_properties = resource_meta['properties']
controller_meta = {}
if "get" in path_meta:
- # Add get method to controller.
+ # Add the get method to controller.
@pecan.expose("json")
def _get(self, vim_id, tenant_id, resource_id):
""" General GET """
@@ -162,7 +162,7 @@ def _build_api_controller(api_meta):
controller_meta["get"] = _get
if "get_all" in path_meta:
- # Add get_all method to controller
+ # Add the get_all method to controller.
@pecan.expose("json")
def _get_all(self, vim_id, tenant_id):
""" General GET all """
@@ -183,7 +183,7 @@ def _build_api_controller(api_meta):
controller_meta["get_all"] = _get_all
if "post" in path_meta:
- # Add post method to controller
+ # Add the post method to controller.
@pecan.expose("json")
def _post(self, vim_id, tenant_id):
""" General POST """
@@ -209,7 +209,7 @@ def _build_api_controller(api_meta):
controller_meta["post"] = _post
if "delete" in path_meta:
- # Add delete method to controller
+ # Add the delete method to controller.
@pecan.expose("json")
def _delete(self, vim_id, tenant_id, resource_id):
""" General DELETE """