Fix the inconsistency about some parameters regarding to pod
1.What is the problem? Naming of some parameter regarding pod is a little bit different. This inconsistency has to be fixed out as much as possible 2.What is the solution to the problem? Rename the inconsistent parameter. 3.What the features need to be implemented to the Tricircle to realize the solution? No new features. Change-Id: Ib9515aea84b9dfa1492a64ddf9bb60103df75500 Closes-Bug: #1583436
This commit is contained in:
parent
a4e30a9f64
commit
62dbda330b
@ -201,7 +201,7 @@ class ServerController(rest.RestController):
|
||||
pecan.response.status = 204
|
||||
return pecan.response
|
||||
|
||||
def _get_or_create_route(self, context, pod, _id, _type):
|
||||
def _get_or_create_route(self, context, pod_name, _id, _type):
|
||||
def list_resources(t_ctx, q_ctx, pod_, ele, _type_):
|
||||
client = self._get_client(pod_['pod_name'])
|
||||
return client.list_resources(_type_, t_ctx, [{'key': 'name',
|
||||
@ -209,7 +209,8 @@ class ServerController(rest.RestController):
|
||||
'value': ele['id']}])
|
||||
|
||||
return t_lock.get_or_create_route(context, None,
|
||||
self.project_id, pod, {'id': _id},
|
||||
self.project_id,
|
||||
pod_name, {'id': _id},
|
||||
_type, list_resources)
|
||||
|
||||
@staticmethod
|
||||
|
@ -35,9 +35,9 @@ class VolumeController(rest.RestController):
|
||||
def __init__(self, project_id, server_id):
|
||||
self.project_id = project_id
|
||||
self.server_id = server_id
|
||||
self.clients = {'top': t_client.Client()}
|
||||
self.clients = {constants.TOP: t_client.Client()}
|
||||
|
||||
def _get_client(self, pod_name='top'):
|
||||
def _get_client(self, pod_name=constants.TOP):
|
||||
if pod_name not in self.clients:
|
||||
self.clients[pod_name] = t_client.Client(pod_name)
|
||||
return self.clients[pod_name]
|
||||
|
Loading…
Reference in New Issue
Block a user