def setUp(self): VncApiMock.init() DBMock.init() vnc_kubernetes.VncKubernetes.reset() self.args = Mock() self.args.admin_user = "******" self.args.admin_password = "******" self.args.admin_tenant = "default" self.args.vnc_endpoint_ip = '127.0.0.1' self.args.vnc_endpoint_port = "8082" self.args.auth_token_url = "token" self.args.cluster_project = None self.args.cluster_network = None self.args.cluster_pod_network = None self.args.cluster_service_network = None self.args.pod_subnets = ['10.10.0.0/16'] self.args.service_subnets = ['192.168.0.0/24'] self.args.kubernetes_api_secure_port = "8443" self.args.auth_user = "******" self.args.auth_password = "******" self.args.auth_tenant = "default" self.args.cassandra_server_list = () api = VncApiMock(self.args.auth_user, self.args.auth_password, self.args.auth_tenant, self.args.vnc_endpoint_ip, self.args.vnc_endpoint_port, self.args.auth_token_url) domain_uuid = api.domain_create(Domain("default-domain")) domain = api.domain_read(id=domain_uuid) proj_uuid = api.project_create( Project("default-project", parent_obj=domain)) proj = api.project_read(id=proj_uuid) net = VirtualNetwork("ip-fabric", proj) api.virtual_network_create(net)
def setUp(self): VncApiMock.init() DBMock.init() vnc_kubernetes.VncKubernetes.reset() self.args = Mock() self.args.admin_user = "******" self.args.admin_password = "******" self.args.admin_tenant = "default" self.args.vnc_endpoint_ip = '127.0.0.1' self.args.vnc_endpoint_port = "8082" self.args.auth_token_url = "token" self.args.cluster_project = None self.args.cluster_network = None self.args.cluster_pod_network = None self.args.cluster_service_network = None self.args.cluster_name = "cluster" self.args.pod_subnets = ['10.10.0.0/16'] self.args.ip_fabric_subnets = ['20.20.0.0/16'] self.args.service_subnets = ['192.168.0.0/24'] self.args.kubernetes_api_secure_port = "8443" self.args.auth_user = "******" self.args.auth_password = "******" self.args.auth_tenant = "default" self.args.cassandra_server_list = () self.args.aps_name="test-aps" self.args.rabbit_port = None self.args.collectors = "" api = VncApiMock( self.args.auth_user, self.args.auth_password, self.args.auth_tenant, self.args.vnc_endpoint_ip, self.args.vnc_endpoint_port, self.args.auth_token_url ) domain_uuid = api.domain_create(Domain("default-domain")) domain = api.domain_read(id=domain_uuid) proj_uuid = api.project_create(Project("default-project", parent_obj=domain)) proj = api.project_read(id=proj_uuid) net = VirtualNetwork("ip-fabric", proj) api.virtual_network_create(net)
def setUp(self): VncApiMock.init() DBMock.init() vnc_kubernetes.VncKubernetes.reset() self.args = Mock() self.args.admin_user = "******" self.args.admin_password = "******" self.args.admin_tenant = "default" self.args.vnc_endpoint_ip = '127.0.0.1' self.args.vnc_endpoint_port = "8082" self.args.auth_token_url = "token" self.args.cluster_project = None self.args.cluster_network = None self.args.pod_subnets = ['10.10.0.0/16'] self.args.service_subnets = ['192.168.0.0/24'] self.args.kubernetes_api_secure_port = "8443" self.args.auth_user = "******" self.args.auth_password = "******" self.args.auth_tenant = "default" self.args.cassandra_server_list = ()
def setUp(self): VncApiMock.init() DBMock.init() vnc_kubernetes.VncKubernetes.reset() self.args = Mock() self.args.admin_user = "******" self.args.admin_password = "******" self.args.admin_tenant = "default" self.args.vnc_endpoint_ip = '127.0.0.1' self.args.vnc_endpoint_port = "8082" self.args.auth_token_url = "token" self.args.cluster_project = None self.args.cluster_network = None self.args.pod_subnets = ['10.10.0.0/16'] self.args.service_subnets = ['192.168.0.0/24'] self.args.kubernetes_api_secure_port = "8443" self.args.auth_user = "******" self.args.auth_password = "******" self.args.auth_tenant = "default" self.args.cassandra_server_list = ()