def setup_clients(cls): """Create various client connections. Such as NSXv3 and L2 Gateway. """ super(FeatureManager, cls).setup_clients() try: manager = getattr(cls.os_admin, "manager", cls.os_admin) net_client = getattr(manager, "networks_client") _params = manager.default_params_withy_timeout_values.copy() except AttributeError as attribute_err: LOG.warning("Failed to locate the attribute, Error: %(err_msg)s", {"err_msg": attribute_err.__str__()}) _params = {} cls.l2gw_client = openstack_network_clients.L2GatewayClient( net_client.auth_provider, net_client.service, net_client.region, net_client.endpoint_type, **_params) cls.nsx_client = nsx_client.NSXClient(CONF.network.backend, CONF.nsxv3.nsx_manager, CONF.nsxv3.nsx_user, CONF.nsxv3.nsx_password) cls.l2gwc_client = openstack_network_clients.L2GatewayConnectionClient( net_client.auth_provider, net_client.service, net_client.region, net_client.endpoint_type, **_params) cls.load_balancers_client = \ load_balancers_client.get_client(cls.os_primary) cls.listeners_client = listeners_client.get_client(cls.os_primary) cls.pools_client = pools_client.get_client(cls.os_primary) cls.members_client = members_client.get_client(cls.os_primary) cls.health_monitors_client = \ health_monitors_client.get_client(cls.os_primary)
def create_lbaas_clients(cls, mgr): cls.load_balancers_client = load_balancers_client.get_client(mgr) cls.listeners_client = listeners_client.get_client(mgr) cls.pools_client = pools_client.get_client(mgr) cls.members_client = members_client.get_client(mgr) cls.health_monitors_client = health_monitors_client.get_client(mgr) # l7-switching clients cls.l7policies_client = l7policies_client.get_client(cls.manager) cls.l7rules_client = l7rules_client.get_client(cls.manager)
def create_lbaas_clients(cls, mgr): cls.load_balancers_client = load_balancers_client.get_client(mgr) cls.listeners_client = listeners_client.get_client(mgr) cls.pools_client = pools_client.get_client(mgr) cls.members_client = members_client.get_client(mgr) cls.health_monitors_client = health_monitors_client.get_client(mgr)