예제 #1
0
 def delete_pool(self, context, pool):
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(pool["description"])
     nfp_logging.store_logging_context(meta_id=nf_id)
     nf = common.get_network_function_details(context, nf_id)
     self._delete(context, pool['tenant_id'], 'pool', nf, pool=pool)
     nfp_logging.clear_logging_context()
예제 #2
0
 def delete_vip(self, context, vip):
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(vip["description"])
     nfp_logging.store_logging_context(meta_id=nf_id)
     nf = common.get_network_function_details(context, nf_id)
     self._delete(context, vip['tenant_id'], 'vip', nf, vip=vip)
     nfp_logging.clear_logging_context()
예제 #3
0
 def delete_member(self, context, member):
     loadbalancer = member['pool']['loadbalancer']
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_logging.store_logging_context(meta_id=nf_id)
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('member', member)
     self._delete(context, member['tenant_id'], 'member', nf, member=member)
     nfp_logging.clear_logging_context()
예제 #4
0
 def delete_member(self, context, member):
     # Fetch pool from pool_id
     pool = self._get_pool(context, member['pool_id'])
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(pool["description"])
     nfp_logging.store_logging_context(meta_id=nf_id)
     nf = common.get_network_function_details(context, nf_id)
     self._delete(context, member['tenant_id'], 'member', nf, member=member)
     nfp_logging.clear_logging_context()
예제 #5
0
 def create_pool(self, context, pool):
     loadbalancer = pool['loadbalancer']
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_logging.store_logging_context(meta_id=nf_id)
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('pool', pool)
     self._post(context, pool['tenant_id'], 'pool', nf, pool=pool)
     nfp_logging.clear_logging_context()
예제 #6
0
 def delete_firewall(self, context, firewall, host):
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(firewall["description"])
     nfp_logging.store_logging_context(meta_id=nf_id)
     nf = common.get_network_function_details(context, nf_id)
     body = self._data_wrapper(context, firewall, host, nf, 'DELETE')
     transport.send_request_to_configurator(self._conf, context, body,
                                            "DELETE")
     nfp_logging.clear_logging_context()
예제 #7
0
 def delete_pool(self, context, pool):
     nfp_context = module_context.init()
     LOG.info("Received RPC DELETE POOL for Pool:%(pool)s", {'pool': pool})
     loadbalancer = pool['loadbalancer']
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('pool', pool)
     self._delete(context, pool['tenant_id'], 'pool', nf, pool=pool)
예제 #8
0
 def delete_loadbalancer(self, context, loadbalancer,
                         delete_vip_port=True):
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_logging.store_logging_context(meta_id=nf_id)
     nf = common.get_network_function_details(context, nf_id)
     self._delete(
         context, loadbalancer['tenant_id'],
         'loadbalancer', nf, loadbalancer=loadbalancer)
     nfp_logging.clear_logging_context()
예제 #9
0
 def create_listener(self, context, listener):
     loadbalancer = listener['loadbalancer']
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_logging.store_logging_context(meta_id=nf_id)
     nf = common.get_network_function_details(context, nf_id)
     self._post(
         context, listener['tenant_id'],
         'listener', nf, listener=listener)
     nfp_logging.clear_logging_context()
예제 #10
0
 def delete_healthmonitor(self, context, healthmonitor):
     loadbalancer = healthmonitor['pool']['loadbalancer']
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_logging.store_logging_context(meta_id=nf_id)
     nf = common.get_network_function_details(context, nf_id)
     self._delete(
         context, healthmonitor['tenant_id'],
         'healthmonitor', nf, healthmonitor=healthmonitor)
     nfp_logging.clear_logging_context()
예제 #11
0
 def delete_firewall(self, context, firewall, host):
     nfp_context = module_context.init()
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(firewall["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     LOG.info("Received RPC DELETE FIREWALL for "
              "Firewall: %(firewall)s", {'firewall': firewall})
     body = self._data_wrapper(context, firewall, host, nf, 'DELETE')
     transport.send_request_to_configurator(self._conf, context, body,
                                            "DELETE")
예제 #12
0
 def create_loadbalancer(self, context, loadbalancer, driver_name,
                         allocate_vip=True):
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_logging.store_logging_context(meta_id=nf_id)
     nf = common.get_network_function_details(context, nf_id)
     self._post(
         context, loadbalancer['tenant_id'],
         'loadbalancer', nf,
         loadbalancer=loadbalancer, driver_name=driver_name)
     nfp_logging.clear_logging_context()
예제 #13
0
 def update_member(self, context, old_member, member):
     nfp_context = module_context.init()
     loadbalancer = member['pool']['loadbalancer']
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('member', member)
     self._put(
         context, member['tenant_id'],
         'member', nf, old_member=old_member, member=member)
예제 #14
0
 def delete_member(self, context, member):
     nfp_context = module_context.init()
     LOG.info(_LI("Received RPC DELETE MEMBER for Member:%(member)s"),
              {'member': member})
     loadbalancer = member['pool']['loadbalancer']
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('member', member)
     self._delete(context, member['tenant_id'], 'member', nf, member=member)
예제 #15
0
 def delete_pool_health_monitor(self, context, health_monitor, pool_id):
     # Fetch pool from pool_id
     pool = self._get_pool(context, pool_id)
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(pool["description"])
     nfp_logging.store_logging_context(meta_id=nf_id)
     nf = common.get_network_function_details(context, nf_id)
     self._delete(
         context, health_monitor['tenant_id'], 'pool_health_monitor',
         nf, health_monitor=health_monitor, pool_id=pool_id)
     nfp_logging.clear_logging_context()
예제 #16
0
 def delete_firewall(self, context, firewall, host):
     nfp_context = module_context.init()
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(firewall["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     LOG.info("Received RPC DELETE FIREWALL for "
              "Firewall: %(firewall)s",
              {'firewall': firewall})
     body = self._data_wrapper(context, firewall, host, nf, 'DELETE')
     transport.send_request_to_configurator(self._conf,
                                            context, body, "DELETE")
예제 #17
0
 def vpnservice_updated(self, context, **kwargs):
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(
         kwargs['resource']['description'])
     nfp_logging.store_logging_context(meta_id=nf_id)
     nf = common.get_network_function_details(context, nf_id)
     reason = kwargs['reason']
     body = self._data_wrapper(context, kwargs['resource']['tenant_id'], nf,
                               **kwargs)
     transport.send_request_to_configurator(self._conf, context, body,
                                            reason)
     nfp_logging.clear_logging_context()
예제 #18
0
 def delete_loadbalancer(self, context, loadbalancer,
                         delete_vip_port=True):
     nfp_context = module_context.init()
     LOG.info("Received RPC DELETE LOADBALANCER for LB:"
              "%(lb)s", {'lb': loadbalancer})
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('loadbalancer', loadbalancer)
     self._delete(
         context, loadbalancer['tenant_id'],
         'loadbalancer', nf, loadbalancer=loadbalancer)
예제 #19
0
 def update_loadbalancer(self, context, old_loadbalancer, loadbalancer):
     nfp_context = module_context.init()
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('loadbalancer', loadbalancer)
     self._put(context,
               loadbalancer['tenant_id'],
               'loadbalancer',
               nf,
               old_loadbalancer=old_loadbalancer,
               loadbalancer=loadbalancer)
예제 #20
0
 def create_listener(self, context, listener):
     nfp_context = module_context.init()
     LOG.info("Received RPC CREATE LISTENER for Listener:%(listener)s",
              {'listener': listener})
     loadbalancer = listener['loadbalancer']
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('listener', listener)
     self._post(
         context, listener['tenant_id'],
         'listener', nf, listener=listener)
예제 #21
0
 def delete_pool(self, context, pool):
     nfp_context = module_context.init()
     LOG.info("Received RPC DELETE POOL for Pool:%(pool)s",
              {'pool': pool})
     loadbalancer = pool['loadbalancer']
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('pool', pool)
     self._delete(
         context, pool['tenant_id'],
         'pool', nf, pool=pool)
예제 #22
0
 def delete_member(self, context, member):
     nfp_context = module_context.init()
     LOG.info("Received RPC DELETE MEMBER for Member:%(member)s",
              {'member': member})
     loadbalancer = member['pool']['loadbalancer']
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('member', member)
     self._delete(
         context, member['tenant_id'],
         'member', nf, member=member)
예제 #23
0
 def delete_healthmonitor(self, context, healthmonitor):
     nfp_context = module_context.init()
     LOG.info("Received RPC DELETE HEALTH MONITOR for HM:%(hm)s",
              {'hm': healthmonitor})
     loadbalancer = healthmonitor['pool']['loadbalancer']
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('healthmonitor', healthmonitor)
     self._delete(
         context, healthmonitor['tenant_id'],
         'healthmonitor', nf, healthmonitor=healthmonitor)
예제 #24
0
 def update_loadbalancer(self, context, old_loadbalancer, loadbalancer):
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_logging.store_logging_context(meta_id=nf_id)
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('loadbalancer', loadbalancer)
     self._put(context,
               loadbalancer['tenant_id'],
               'loadbalancer',
               nf,
               old_loadbalancer=old_loadbalancer,
               loadbalancer=loadbalancer)
     nfp_logging.clear_logging_context()
예제 #25
0
 def delete_loadbalancer(self, context, loadbalancer, delete_vip_port=True):
     nfp_context = module_context.init()
     LOG.info(_LI("Received RPC DELETE LOADBALANCER for LB:"
                  "%(lb)s"), {'lb': loadbalancer})
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('loadbalancer', loadbalancer)
     self._delete(context,
                  loadbalancer['tenant_id'],
                  'loadbalancer',
                  nf,
                  loadbalancer=loadbalancer)
예제 #26
0
 def vpnservice_updated(self, context, **kwargs):
     nfp_context = module_context.init()
     LOG.info(_LI("Received RPC VPN SERVICE UPDATED with data:%(data)s"),
              {'data': kwargs})
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(
         kwargs['resource']['description'])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     reason = kwargs['reason']
     body = self._data_wrapper(context, kwargs['resource']['tenant_id'], nf,
                               **kwargs)
     transport.send_request_to_configurator(self._conf, context, body,
                                            reason)
예제 #27
0
 def delete_healthmonitor(self, context, healthmonitor):
     nfp_context = module_context.init()
     LOG.info(_LI("Received RPC DELETE HEALTH MONITOR for HM:%(hm)s"),
              {'hm': healthmonitor})
     loadbalancer = healthmonitor['pool']['loadbalancer']
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('healthmonitor', healthmonitor)
     self._delete(context,
                  healthmonitor['tenant_id'],
                  'healthmonitor',
                  nf,
                  healthmonitor=healthmonitor)
예제 #28
0
 def create_listener(self, context, listener):
     nfp_context = module_context.init()
     LOG.info(_LI("Received RPC CREATE LISTENER for Listener:%(listener)s"),
              {'listener': listener})
     loadbalancer = listener['loadbalancer']
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('listener', listener)
     self._post(context,
                listener['tenant_id'],
                'listener',
                nf,
                listener=listener)
예제 #29
0
 def vpnservice_updated(self, context, **kwargs):
     nfp_context = module_context.init()
     LOG.info("Received RPC VPN SERVICE UPDATED with data:%(data)s",
              {'data': kwargs})
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(kwargs[
         'resource']['description'])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     reason = kwargs['reason']
     body = self._data_wrapper(context, kwargs[
         'resource']['tenant_id'], nf, **kwargs)
     transport.send_request_to_configurator(self._conf,
                                            context, body,
                                            reason)
예제 #30
0
 def create_loadbalancer(self,
                         context,
                         loadbalancer,
                         driver_name,
                         allocate_vip=True):
     nfp_context = module_context.init()
     LOG.info("Received RPC CREATE LOADBALANCER for LB:%(lb)s",
              {'lb': loadbalancer})
     # Fetch nf_id from description of the resource
     nf_id = self._fetch_nf_from_resource_desc(loadbalancer["description"])
     nfp_context['log_context']['meta_id'] = nf_id
     nf = common.get_network_function_details(context, nf_id)
     self._update_tls_cert('loadbalancer', loadbalancer)
     self._post(context,
                loadbalancer['tenant_id'],
                'loadbalancer',
                nf,
                loadbalancer=loadbalancer,
                driver_name=driver_name)