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
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
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
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