def setUpClass(self): ctx = self.mock_ctx("init") ctx.logger.info("BEGIN test subnet number " + self.__random_id) ctx.logger.info("CREATE resource_group") current_ctx.set(ctx=ctx) resource_group.create(ctx=ctx) ctx.logger.info("CREATE network") current_ctx.set(ctx=ctx) ctx.node.properties[constants.VIRTUAL_NETWORK_ADDRESS_KEY] = "10.0.0.0/16" network.create(ctx=ctx)
def setUpClass(self): ctx = self.mock_ctx('init','') ctx.logger.info("BEGIN test datadisk number "\ + self.__random_id) current_ctx.set(ctx=ctx) ctx.logger.info("CREATE ressource_group") resource_group.create(ctx=ctx) current_ctx.set(ctx=ctx) utils.wait_status(ctx, "resource_group", constants.SUCCEEDED, timeout=600) current_ctx.set(ctx=ctx) ctx.logger.info("CREATE storage account") ctx.node.properties[constants.ACCOUNT_TYPE_KEY] = "Standard_LRS" storage.create(ctx=ctx) current_ctx.set(ctx=ctx) utils.wait_status(ctx, "storage",constants.SUCCEEDED, timeout=600) ctx.logger.info("CREATE network") current_ctx.set(ctx=ctx) ctx.node.properties[constants.VIRTUAL_NETWORK_ADDRESS_KEY] = \ "10.0.0.0/16" network.create(ctx=ctx) current_ctx.set(ctx=ctx) utils.wait_status(ctx, "network",constants.SUCCEEDED, timeout=600) ctx.logger.info("CREATE subnet") current_ctx.set(ctx=ctx) ctx.node.properties[constants.SUBNET_ADDRESS_KEY] = "10.0.1.0/24" ctx.instance.runtime_properties[constants.VIRTUAL_NETWORK_KEY] =\ "diskvirtualnetwork_test" + self.__random_id subnet.create(ctx=ctx) current_ctx.set(ctx=ctx) utils.wait_status(ctx, "subnet",constants.SUCCEEDED, timeout=600) ctx.logger.info("CREATE NIC") current_ctx.set(ctx=ctx) nic.create(ctx=ctx) current_ctx.set(ctx=ctx) utils.wait_status(ctx, "nic",constants.SUCCEEDED, timeout=600)
def setUpClass(self): ctx = self.mock_ctx('init') ctx.logger.info("BEGIN test NIC number " + self.__random_id) ctx.logger.info("CREATE NIC\'s required resources") ctx.logger.info("CREATE ressource_group") current_ctx.set(ctx=ctx) resource_group.create(ctx=ctx) ctx.logger.info("CREATE public_ip") current_ctx.set(ctx=ctx) ctx.node.properties[constants.PUBLIC_IP_KEY] = "nic_public_ip_test" + self.__random_id public_ip.create(ctx=ctx) ctx.logger.info("CREATE network") current_ctx.set(ctx=ctx) ctx.node.properties[constants.VIRTUAL_NETWORK_ADDRESS_KEY] = "10.0.0.0/16" network.create(ctx=ctx) ctx.logger.info("CREATE subnet") current_ctx.set(ctx=ctx) ctx.node.properties[constants.SUBNET_ADDRESS_KEY] = "10.0.1.0/24" subnet.create(ctx=ctx)