def test_sdn_crud(provider, appliance): """ Test for functional addition of network manager with cloud provider and functional references to components on detail page Prerequisites: Cloud provider in cfme """ view = navigate_to(provider, 'Details') net_prov_name = view.contents.relationships.get_text_of("Network Manager") collection = NetworkProviderCollection(appliance) network_provider = collection.instantiate(name=net_prov_name) view = navigate_to(network_provider, 'Details') parent_name = view.entities.relationships.get_text_of( "Parent Cloud Provider") assert parent_name == provider.name testing_list = [ "Cloud Networks", "Cloud Subnets", "Network Routers", "Security Groups", "Floating IPs", "Network Ports", "Load Balancers" ] for testing_name in testing_list: view = navigate_to(network_provider, 'Details') view.entities.relationships.click_at(testing_name) provider.delete_if_exists(cancel=False) provider.wait_for_delete() assert not network_provider.exists
def test_sdn_crud(provider, appliance): """ Test for functional addition of network manager with cloud provider and functional references to components on detail page Prerequisites: Cloud provider in cfme """ view = navigate_to(provider, 'Details') net_prov_name = view.entities.relationships.get_text_of("Network Manager") collection = NetworkProviderCollection(appliance) network_provider = collection.instantiate(name=net_prov_name) view = navigate_to(network_provider, 'Details') parent_name = view.entities.relationships.get_text_of("Parent Cloud Provider") assert parent_name == provider.name testing_list = ["Cloud Networks", "Cloud Subnets", "Network Routers", "Security Groups", "Floating IPs", "Network Ports", "Load Balancers"] for testing_name in testing_list: view = navigate_to(network_provider, 'Details') view.entities.relationships.click_at(testing_name) provider.delete_if_exists(cancel=False) provider.wait_for_delete() assert not network_provider.exists
def test_provider_topology_navigation(provider, appliance): view = navigate_to(provider, 'Details') net_prov_name = view.entities.summary("Relationships").get_text_of("Network Manager") collection = NetworkProviderCollection(appliance) network_provider = collection.instantiate(name=net_prov_name) navigate_to(network_provider, "TopologyFromDetails") provider.delete_if_exists(cancel=False) provider.wait_for_delete()
def test_sdn_provider_relationships_navigation(provider, tested_part, appliance): view = navigate_to(provider, 'Details') net_prov_name = view.entities.summary("Relationships").get_text_of("Network Manager") collection = NetworkProviderCollection(appliance) network_provider = collection.instantiate(name=net_prov_name) view = navigate_to(network_provider, 'Details') value = view.entities.relationships.get_text_of(tested_part) if value != "0": navigate_to(network_provider, tested_part.replace(' ', ''))
def test_provider_topology_navigation(provider): view = navigate_to(provider, 'Details') net_prov_name = view.contents.relationships.get_text_of('Network Manager') collection = NetworkProviderCollection() network_provider = collection.instantiate(name=net_prov_name) navigate_to(network_provider, "TopologyFromDetails") provider.delete_if_exists(cancel=False) provider.wait_for_delete()
def test_provider_relationships_navigation(provider, tested_part): view = navigate_to(provider, 'Details') net_prov_name = view.contents.relationships.get_text_of('Network Manager') collection = NetworkProviderCollection() network_provider = collection.instantiate(name=net_prov_name) view = navigate_to(network_provider, 'Details') value = view.entities.relationships.get_text_of(tested_part) if value != "0": navigate_to(network_provider, tested_part.replace(' ', ''))
def network_provider(self): """ Returns network provider """ from cfme.networks.provider import NetworkProviderCollection # security group collection contains reference to provider if self.collection.parent: return self.collection.parent # otherwise get provider name from ui view = navigate_to(self, 'Details') try: prov_name = view.entities.relationships.get_text_of("Network Manager") collection = NetworkProviderCollection(appliance=self.appliance) return collection.instantiate(name=prov_name) except ItemNotFound: # BZ 1480577 return None