Ejemplo n.º 1
0
 def _get_provider_name(self, context, pool):
     if "provider" in pool and pool["provider"] != attrs.ATTR_NOT_SPECIFIED:
         provider_name = pconf.normalize_provider_name(pool["provider"])
         self.validate_provider(provider_name)
         return provider_name
     else:
         if not self.default_provider:
             raise pconf.DefaultServiceProviderNotFound(service_type=constants.LOADBALANCER)
         return self.default_provider
Ejemplo n.º 2
0
 def _get_provider_name(self, context, pool):
     if ('provider' in pool
             and pool['provider'] != attrs.ATTR_NOT_SPECIFIED):
         provider_name = pconf.normalize_provider_name(pool['provider'])
         self.validate_provider(provider_name)
         return provider_name
     else:
         if not self.default_provider:
             raise pconf.DefaultServiceProviderNotFound(
                 service_type=constants.LOADBALANCER)
         return self.default_provider
Ejemplo n.º 3
0
 def _get_provider_name(self, entity):
     if ('provider' in entity and
             entity['provider'] != attrs.ATTR_NOT_SPECIFIED):
         provider_name = pconf.normalize_provider_name(entity['provider'])
         self.validate_provider(provider_name)
         return provider_name
     else:
         if not self.default_provider:
             raise pconf.DefaultServiceProviderNotFound(
                 service_type=constants.LOADBALANCERV2)
         return self.default_provider
Ejemplo n.º 4
0
 def _get_provider_name(self, entity):
     if ('provider' in entity and
             entity['provider'] != attrs.ATTR_NOT_SPECIFIED):
         provider_name = pconf.normalize_provider_name(entity['provider'])
         del entity['provider']
         self.validate_provider(provider_name)
         return provider_name
     else:
         if not self.default_provider:
             raise pconf.DefaultServiceProviderNotFound(
                 service_type=constants.LOADBALANCER)
         del entity['provider']
         return self.default_provider