"""\r
-son-emu monitor CLI\r
-(c) 2016 by Manuel Peuster <manuel.peuster@upb.de>\r
+Copyright (c) 2015 SONATA-NFV\r
+ALL RIGHTS RESERVED.\r
+\r
+Licensed under the Apache License, Version 2.0 (the "License");\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Neither the name of the SONATA-NFV [, ANY ADDITIONAL AFFILIATION]\r
+nor the names of its contributors may be used to endorse or promote\r
+products derived from this software without specific prior written\r
+permission.\r
+\r
+This work has been performed in the framework of the SONATA project,\r
+funded by the European Commission under Grant number 671517 through\r
+the Horizon 2020 and 5G-PPP programmes. The authors would like to\r
+acknowledge the contributions of their colleagues of the SONATA\r
+partner consortium (www.sonata-nfv.eu).\r
"""\r
\r
import argparse\r
import pprint\r
import zerorpc\r
-import prometheus\r
+from emuvim.cli import prometheus\r
\r
pp = pprint.PrettyPrinter(indent=4)\r
\r
args.get("cookie"))\r
pp.pprint(r)\r
\r
- def prometheus_zrpc(self, args):\r
- vnf_name = self._parse_vnf_name(args.get("vnf_name"))\r
- vnf_interface = self._parse_vnf_interface(args.get("vnf_name"))\r
- r = self.c.prometheus(\r
- args.get("datacenter"),\r
- vnf_name,\r
- vnf_interface,\r
- args.get("query"))\r
- pp.pprint(r)\r
-\r
def prometheus(self, args):\r
+ # This functions makes it more user-friendly to create the correct prometheus query\r
+ # <uuid> is replaced by the correct uuid of the deployed vnf container\r
vnf_name = self._parse_vnf_name(args.get("vnf_name"))\r
vnf_interface = self._parse_vnf_interface(args.get("vnf_name"))\r
dc_label = args.get("datacenter")\r