add new interface
Change-Id: I646a0a2613aa5fda60cb4a69da15db7f093f3346
This commit is contained in:
@@ -36,7 +36,7 @@ LOG = logging.getLogger(__name__)
|
||||
USER_AGENT = 'python-venusclient'
|
||||
CHUNKSIZE = 1024 * 64 # 64kB
|
||||
|
||||
API_VERSION = '/v1'
|
||||
API_VERSION = '/v1.0'
|
||||
DEFAULT_API_VERSION = 'latest'
|
||||
|
||||
|
||||
|
||||
@@ -635,4 +635,5 @@ def main():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(os.environ)
|
||||
main()
|
||||
|
||||
@@ -33,3 +33,11 @@ class ConfigManager(basemodels.BaseModelManager):
|
||||
resp, body = self.api.json_request('GET', url)
|
||||
except Exception as e:
|
||||
raise RuntimeError(str(e))
|
||||
|
||||
def get_logs(self, args):
|
||||
print(args)
|
||||
url = '/v1/search/logs'
|
||||
try:
|
||||
resp, body = self.api.json_request('GET', url)
|
||||
except Exception as e:
|
||||
raise RuntimeError(str(e))
|
||||
|
||||
@@ -17,3 +17,9 @@ def do_get_log_storage_days(cs, args):
|
||||
"""get the days of saved logs in elasticsearch(unit day)."""
|
||||
endpoint = cs.config.get_days()
|
||||
print(endpoint)
|
||||
|
||||
|
||||
def do_get_log(cs, args):
|
||||
"""get log content"""
|
||||
endpoint = cs.config.search_logs(args)
|
||||
print(endpoint)
|
||||
|
||||
Reference in New Issue
Block a user