File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ def getoper (self, path):
106
106
return objects
107
107
108
108
def showcmdtextoutput (self , cli ):
109
- """ Get of CLI show commands
109
+ """ Get of CLI show commands in text
110
110
:param data: cli show
111
111
:type data: str
112
112
:return: Return the response object
@@ -115,5 +115,26 @@ def showcmdtextoutput (self, cli):
115
115
stub = ems_grpc_pb2 .beta_create_gRPCExec_stub (self ._channel )
116
116
message = ems_grpc_pb2 .ShowCmdArgs (cli = cli )
117
117
response = stub .ShowCmdTextOutput (message , self ._timeout , metadata = self ._metadata )
118
+ objects = ''
119
+ for response in responses :
120
+ objects += response .output
121
+ return objects
122
+
123
+ def showcmdjsonoutput (self , cli ):
124
+ """ Get of CLI show commands in json
125
+ :param data: cli show
126
+ :type data: str
127
+ :return: Return the response object
128
+ :rtype: str
129
+ """
130
+ stub = ems_grpc_pb2 .beta_create_gRPCExec_stub (self ._channel )
131
+ message = ems_grpc_pb2 .ShowCmdArgs (cli = cli )
132
+ response = stub .ShowCmdJSONOutput (message , self ._timeout , metadata = self ._metadata )
133
+ objects = ''
134
+ for response in responses :
135
+ objects += response .jsonoutput
136
+ return objects
137
+
138
+
118
139
119
140
You can’t perform that action at this time.
0 commit comments