Пример #1
0
 def del_slice_host(self, slice_id, virtdev_id, virt_portnum):
     app = 'sliceservice.del_slice_host'
     with Client(url=self.url, realm=self.realm) as client:
         ret = client.call(app,
                           slice_id=slice_id,
                           virtdev_id=virtdev_id,
                           virt_portnum=virt_portnum)
         check_error(ret)
Пример #2
0
 def set_slice(self, tenant_id, label, controller):
     app = "sliceservice.set_slice"
     with Client(url=self.url, realm=self.realm) as client:
         ret = client.call(app,
                           tenant_id=tenant_id,
                           label=label,
                           controller=controller)
         check_error(ret)
         return ret
Пример #3
0
 def set_node(self, datapath_id, prefix_uri, label):
     app = 'topologyservice.set_node'
     with Client(url=self.url, realm=self.realm) as client:
         ret = client.call(app,
                           datapath_id=datapath_id,
                           prefix_uri=prefix_uri,
                           label=label)
         check_error(ret)
         return ret
Пример #4
0
 def set_slice_link(self, slice_id, src_virtdev_id, dst_virtdev_id, tunnel):
     app = "sliceservice.set_slice_link"
     with Client(url=self.url, realm=self.realm) as client:
         ret = client.call(app,
                           slice_id=slice_id,
                           src_virtdev_id=src_virtdev_id,
                           dst_virtdev_id=dst_virtdev_id,
                           tunnel=tunnel)
         check_error(ret)
         return ret
Пример #5
0
 def set_slice_node(self, slice_id, device_id, datapath_id, label,
                    protocols):
     app = "sliceservice.set_slice_node"
     with Client(url=self.url, realm=self.realm) as client:
         ret = client.call(app,
                           slice_id=slice_id,
                           device_id=device_id,
                           datapath_id=datapath_id,
                           label=label,
                           protocols=protocols)
         check_error(ret)
         return ret
Пример #6
0
    def set_link(self, source_id, target_id, source_portnum, target_portnum,
                 tunnel, key):
        app = 'topologyservice.set_link'
        with Client(url=self.url, realm=self.realm) as client:
            ret = client.call(app,
                              source_id=source_id,
                              target_id=target_id,
                              source_portnum=source_portnum,
                              target_portnum=target_portnum,
                              tunnel=tunnel,
                              key=key)

            check_error(ret)
            return ret
Пример #7
0
 def deploy(self, slice):
     app = 'slicebuilderservice.deploy'
     with Client(url=self.url, realm=self.realm) as client:
         client.call(app, slice=slice)
Пример #8
0
 def del_slice(self, slice_id):
     app = "sliceservice.del_slice"
     with Client(url=self.url, realm=self.realm) as client:
         client.call(app, slice_id=slice_id)
Пример #9
0
 def get_shortest_path(self, source_id, target_id):
     app = "topologyservice.get_shortest_path"
     with Client(url=self.url, realm=self.realm) as client:
         ret = client.call(app, source_id=source_id, target_id=target_id)
         check_error(ret)
         return ret
Пример #10
0
 def get_topology(self):
     app = "topologyservice.get_topology"
     with Client(url=self.url, realm=self.realm) as client:
         ret = client.call(app)
         check_error(ret)
         return ret
Пример #11
0
 def del_slice_link(self, slice_id, virtlink_id):
     app = "sliceservice.del_slice_link"
     with Client(url=self.url, realm=self.realm) as client:
         client.call(app, slice_id=slice_id, virtlink_id=virtlink_id)
Пример #12
0
 def del_instance(self, device_id, virtdev_id):
     app = "topologyservice.del_instance"
     with Client(url=self.url, realm=self.realm) as client:
         client.call(app, device_id=device_id, virtdev_id=virtdev_id)
Пример #13
0
 def update_slice_status(self, slice_id, code):
     app = 'sliceservice.update_slice_status'
     with Client(url=self.url, realm=self.realm) as client:
         client.call(app, slice_id=slice_id, code=code)
Пример #14
0
 def has_link(self, source_id, target_id):
     app = "topologyservice.has_link"
     with Client(url=self.url, realm=self.realm) as client:
         ret = client.call(app, source_id=source_id, target_id=target_id)
         check_error(ret)
         return ret
Пример #15
0
 def get_slice_nodes(self, slice_id):
     app = "sliceservice.get_slice_nodes"
     with Client(url=self.url, realm=self.realm) as client:
         ret = client.call(app, slice_id=slice_id)
         check_error(ret)
         return ret
Пример #16
0
 def _call_connection(self, app, **kwargs):
     with Client(url=self.url, realm=self.realm) as client:
         ret = json.loads(client.call(app, **kwargs))
     return ret['result']
Пример #17
0
 def has_node(self, device_id):
     app = 'topologyservice.has_node'
     with Client(url=self.url, realm=self.realm) as client:
         ret = client.call(app, device_id=device_id)
         check_error(ret)
         return ret
Пример #18
0
 def del_node(self, device_id):
     app = 'topologyservice.del_node'
     with Client(url=self.url, realm=self.realm) as client:
         client.call(app, device_id=device_id)
Пример #19
0
 def _publish_connection(self, topic, **kwargs):
     with Client(url=self.url, realm=self.realm) as client:
         client.publish(topic=topic, **kwargs)
Пример #20
0
 def del_slice_node(self, slice_id, virtdev_id):
     app = "sliceservice.del_slice_node"
     with Client(url=self.url, realm=self.realm) as client:
         ret = client.call(app, slice_id=slice_id, virtdev_id=virtdev_id)
         check_error(ret)
Пример #21
0
 def del_link(self, link_id):
     app = 'topologyservice.del_link'
     with Client(url=self.url, realm=self.realm) as client:
         client.call(app, link_id=link_id)
Пример #22
0
 def get_link(self, link_id):
     app = 'topologyservice.get_link'
     with Client(url=self.url, realm=self.realm) as client:
         ret = client.call(app, link_id=link_id)
         check_error(ret)
         return ret
Пример #23
0
 def get_slice_hosts(self, slice_id, virtdev_id):
     app = 'sliceservice.get_slice_hosts'
     with Client(url=self.url, realm=self.realm) as client:
         ret = client.call(app, slice_id=slice_id, virtdev_id=virtdev_id)
         check_error(ret)