Merge "Revert "Creates details API to fetch VNF detials""
This commit is contained in:
commit
7f829587b0
@ -671,9 +671,7 @@ class ShowCommand(TackerCommand, show.ShowOne):
|
||||
|
||||
params = {}
|
||||
if parsed_args.show_details:
|
||||
method_name = 'show_%s_details' % self.resource
|
||||
else:
|
||||
method_name = 'show_%s' % self.resource
|
||||
params = {'verbose': 'True'}
|
||||
if parsed_args.fields:
|
||||
params = {'fields': parsed_args.fields}
|
||||
if self.allow_names:
|
||||
@ -682,10 +680,8 @@ class ShowCommand(TackerCommand, show.ShowOne):
|
||||
else:
|
||||
_id = parsed_args.id
|
||||
|
||||
obj_shower = getattr(tacker_client, method_name)
|
||||
obj_shower = getattr(tacker_client, "show_%s" % self.resource)
|
||||
data = obj_shower(_id, **params)
|
||||
if parsed_args.show_details:
|
||||
data[self.resource] = data.pop('details')[0]
|
||||
self.format_output_data(data)
|
||||
resource = data[self.resource]
|
||||
if self.resource in data:
|
||||
|
@ -339,7 +339,6 @@ class Client(ClientBase):
|
||||
vnfs_path = '/vnfs'
|
||||
vnf_path = '/vnfs/%s'
|
||||
vnf_scale_path = '/vnfs/%s/actions'
|
||||
vnf_detail = '/vnfs/%s/details'
|
||||
|
||||
vims_path = '/vims'
|
||||
vim_path = '/vims/%s'
|
||||
@ -414,10 +413,6 @@ class Client(ClientBase):
|
||||
def show_vnf(self, vnf, **_params):
|
||||
return self.get(self.vnf_path % vnf, params=_params)
|
||||
|
||||
@APIParamsCall
|
||||
def show_vnf_details(self, vnf, **_params):
|
||||
return self.get(self.vnf_detail % vnf, params=_params)
|
||||
|
||||
@APIParamsCall
|
||||
def create_vnf(self, body=None):
|
||||
return self.post(self.vnfs_path, body=body)
|
||||
|
Loading…
Reference in New Issue
Block a user