Adding get-instance-callchain subcommand to venusclient
Change-Id: I41e5cacc9b4e07d004dc776e04558543d7d4b225
This commit is contained in:
@@ -136,3 +136,18 @@ class SearchManager(basemodels.BaseModelManager):
|
||||
return body
|
||||
except Exception as e:
|
||||
raise RuntimeError(str(e))
|
||||
|
||||
def get_instance_callchain(self, request_id='', uuid=''):
|
||||
url = 'v1/search/instance/callchain'
|
||||
|
||||
params = {
|
||||
'request_id': request_id,
|
||||
'uuid': uuid
|
||||
}
|
||||
url += utils.prepare_query_string(params)
|
||||
|
||||
try:
|
||||
resp, body = self.api.json_request('GET', url)
|
||||
return body
|
||||
except Exception as e:
|
||||
raise RuntimeError(str(e))
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from venusclient.common import cliutils as utils
|
||||
|
||||
|
||||
def do_get_log(cs, args):
|
||||
"""get log content"""
|
||||
@@ -60,3 +62,16 @@ def do_get_analyse_logs(cs, args):
|
||||
endpoint = cs.search.do_get_analyse_logs(args)
|
||||
print(endpoint)
|
||||
return endpoint
|
||||
|
||||
|
||||
@utils.arg('request_id',
|
||||
metavar='<request_id>',
|
||||
help='request id.')
|
||||
@utils.arg('uuid',
|
||||
metavar='<uuid>',
|
||||
help='uuid.')
|
||||
def do_get_instance_callchain(cs, args):
|
||||
"""get instance callchain"""
|
||||
endpoint = cs.search.get_instance_callchain(args.request_id, args.uuid)
|
||||
print(endpoint)
|
||||
return endpoint
|
||||
|
||||
Reference in New Issue
Block a user