def test_DeployEdge(): logger.info("TEST - Deploy Edge ") edge_dc = Datacenter.GetDatacenter(property.EDGE_DEPLOYMENT_DATACENTER, pytest.si) cluster_mob = Datacenter.GetCluster(edge_dc, property.EDGE_DEPLOYMENT_CLUSTER_NAME, pytest.si) cluster_mob_id = str(cluster_mob).strip('\'').split(':')[1] logger.info("Edge Appliance Cluster %s" % (cluster_mob_id)) host_mob = Cluster.GetHostsMob(edge_dc, property.EDGE_DEPLOYMENT_CLUSTER_NAME, property.EDGE_DEPLOYMENT_HOST) host_mob_id = str(host_mob).strip('\'').split(':')[1] logger.info("Edge Host %s" % (host_mob_id)) network_mob = Cluster.GetHostNetworkMob(host_mob, property.EDGE_MGMT_NETWORK) network_mob_id = str(network_mob).strip('\'').split(':')[1] logger.info("Edge Network %s" % (network_mob_id)) ds_mob = Cluster.GetDatastoreMob(host_mob, property.EDGE_DATASTORE) ds_mob_id = str(ds_mob).strip('\'').split(':')[1] logger.info("Edge Datastore %s" % (ds_mob_id)) data_network_mob_ids = [] for nw in property.EDGE_DATA_NETWORKS: data_network_mob = Cluster.GetHostNetworkMob(host_mob, nw) data_network_mob_id = str(data_network_mob).strip('\'').split(':')[1] data_network_mob_ids.append(data_network_mob_id) new_edge = EdgeConfiguration.Edge( pytest.stub_config, property.EDGE_SIZE, property.EDGE_HOSTNAME, property.EDGE_IP, property.EDGE_NETWORK_PREFIX, property.EDGE_DEFAULT_GW, property.EDGE_DNS_SERVERS, cluster_mob_id, data_network_mob_ids, host_mob_id, network_mob_id, property.EDGE_NTP_SERVERS, ds_mob_id, pytest.compute_manager_id) pytest.edge_id, final_edge = new_edge.create() assert final_edge == True, "Edge Deployed Successfully"
def test_CreateDHCPPortOnLogicalSwitch(): logger.info("TEST - Create Port on Logical Switch for DHCP") pytest.dcp_port_id, status = EdgeConfiguration.AttachDhcpToLS( logger, pytest.stub_config, pytest.dhcp_server_id, pytest.logical_switch_id) assert status == True, "Could not attach Port to DHCP Logical Switch"
def test_CreateDHCPLogicalSwitch(): logger.info("TEST - Create Logical Switch for DHCP") pytest.logical_switch_id, status = EdgeConfiguration.CreateLogicalSwitch( logger, pytest.stub_config, property.DHCP_SWITCH, pytest.overlay_tz_id) assert status == True, "Logical Switch for DHCP Service could not be created."
def test_CreateDHCPPool(): logger.info("TEST - Create DHCP Server IP Pool") pytest.dhcp_pool_id, status = EdgeConfiguration.CreateDHCPPool( logger, pytest.stub_config, property.DHCP_POOL_START_IP, property.DHCP_POOL_END_IP, property.DHCP_GW_IP, pytest.dhcp_server_id) assert status == True, "Could not create DHCP Pool"
def test_CreateDHCPServer(): logger.info("TEST - Create DHCP Server.") pytest.dhcp_server_id, status = EdgeConfiguration.CreateDHCPServer( logger, pytest.stub_config, property.DHCP_SERVER_IP, pytest.dhcp_server_profile_id) assert status == True, "DHCP Server could not be created"
def test_CreateDHCPServerProfile(): logger.info("TEST - Create DHCP Server Profile") pytest.dhcp_server_profile_id, status = EdgeConfiguration.CreateDHCPServerProfile( logger, pytest.stub_config, pytest.edge_cluster_id) assert status == True, "DHCP Server profile creation failed."
def test_CreateEdgeCluster(): logger.info("TEST - Create Edge Cluster") pytest.edge_cluster_id, status = EdgeConfiguration.CreateEdgeCluster( logger, pytest.stub_config, pytest.edge_tn_result_id) assert status == True, "Could not Create Edge cluster"
def test_EdgeTransportNode(): logger.info("TEST - Add Edge as Transport Node") pytest.edge_tn_result_id, status = EdgeConfiguration.MarkEdgeAsTransportNode( logger, pytest.stub_config, pytest.vtep_pool_id, pytest.edge_uplink_profile_id, pytest.overlay_tz_id, pytest.edge_id) assert status == True, "Edge Node could be added as a Transport Node."
def test_EdgeUplinkProfile(): logger.info("TEST - Create Edge Uplink Profile") pytest.edge_uplink_profile_id = EdgeConfiguration.CreateEdgeUplinkProfile( pytest.stub_config) assert pytest.edge_uplink_profile_id is not None, "Edge Uplink Profile Could not be created"