def test_resources_exists(self): 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_fq_name = ['default-domain'] domain = api.domain_read(fq_name=domain_fq_name) proj_uuid = api.project_create(Project("default", parent_obj=domain)) proj = api.project_read(id=proj_uuid) # Create cluster-default-pod-network ipam_uuid = api.network_ipam_create(NetworkIpam("pod-ipam", proj)) ipam = api.network_ipam_read(id=ipam_uuid) net = VirtualNetwork("cluster-default-pod-network", proj) # No subnets are associated with IPAM at this point. # Subnets will be updated in the IPAM, when cluster is created. net.add_network_ipam(ipam, VnSubnetsType([])) api.virtual_network_create(net) # Create cluster-default-service-network ipam_uuid = api.network_ipam_create(NetworkIpam("service-ipam", proj)) ipam = api.network_ipam_read(id=ipam_uuid) net = VirtualNetwork("cluster-default-service-network", proj) # No subnets are associated with IPAM at this point. # Subnets will be updated in the IPAM, when cluster is created. net.add_network_ipam(ipam, VnSubnetsType([])) api.virtual_network_create(net) vnc_kubernetes.VncKubernetes(self.args, Mock())
def test_resources_exists(self): 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_fq_name = ['default-domain'] domain = api.domain_read(fq_name=domain_fq_name) proj_uuid = api.project_create(Project("default", parent_obj=domain)) proj = api.project_read(id=proj_uuid) # Create cluster-default-pod-network ipam_uuid = api.network_ipam_create(NetworkIpam("pod-ipam", proj)) ipam = api.network_ipam_read(id=ipam_uuid) net = VirtualNetwork("cluster-default-pod-network", proj) # No subnets are associated with IPAM at this point. # Subnets will be updated in the IPAM, when cluster is created. net.add_network_ipam(ipam, VnSubnetsType([])) api.virtual_network_create(net) # Create cluster-default-service-network ipam_uuid = api.network_ipam_create(NetworkIpam("service-ipam", proj)) ipam = api.network_ipam_read(id=ipam_uuid) net = VirtualNetwork("cluster-default-service-network", proj) # No subnets are associated with IPAM at this point. # Subnets will be updated in the IPAM, when cluster is created. net.add_network_ipam(ipam, VnSubnetsType([])) api.virtual_network_create(net) vnc_kubernetes.VncKubernetes(self.args, Mock())
def test_resources_exists(self): 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", parent_obj=domain)) proj = api.project_read(id=proj_uuid) ipam_uuid = api.network_ipam_create(NetworkIpam("pod-ipam", proj)) ipam = api.network_ipam_read(id=ipam_uuid) net = VirtualNetwork("cluster-network", proj) net.add_network_ipam(ipam, VnSubnetsType([])) api.virtual_network_create(net) vnc_kubernetes.VncKubernetes(self.args, Mock())
def test_resources_exists(self): 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", parent_obj=domain)) proj = api.project_read(id=proj_uuid) ipam_uuid = api.network_ipam_create(NetworkIpam("pod-ipam", proj)) ipam = api.network_ipam_read(id=ipam_uuid) net = VirtualNetwork("cluster-network", proj) net.add_network_ipam(ipam, VnSubnetsType([])) api.virtual_network_create(net) vnc_kubernetes.VncKubernetes(self.args, Mock())