Scalr\Tests\Service\Azure\AzureTest::deleteAllTestObjects PHP Method

deleteAllTestObjects() private method

Clean up from test data
private deleteAllTestObjects ( )
    private function deleteAllTestObjects()
    {
        try {
            $infoAvail = $this->azure->compute->availabilitySet->getInfo($this->subscriptionId, $this->resourceGroupName, $this->availabilitySetName);
            $this->assertNotEmpty($infoAvail);
            $delete = $this->azure->compute->availabilitySet->delete($this->subscriptionId, $this->resourceGroupName, $this->availabilitySetName);
            $this->assertTrue($delete);
        } catch (Exception $e) {
        }
        try {
            $infoRes = $this->azure->resourceManager->resourceGroup->getInfo($this->subscriptionId, $this->resourceGroupName);
            $this->assertNotEmpty($infoRes);
            $delete = $this->azure->resourceManager->resourceGroup->delete($this->subscriptionId, $this->resourceGroupName);
            $this->assertTrue($delete);
        } catch (Exception $e) {
        }
        try {
            $this->azure->network->publicIPAddress->getInfo($this->subscriptionId, $this->resourceGroupName, $this->publicIpName);
            $delete = $this->azure->network->publicIPAddress->delete($this->subscriptionId, $this->resourceGroupName, $this->publicIpName);
            $this->assertTrue($delete);
        } catch (Exception $e) {
        }
        try {
            $this->azure->network->securityGroup->getInfo($this->subscriptionId, $this->resourceGroupName, $this->sgName);
            $delete = $this->azure->network->securityGroup->delete($this->subscriptionId, $this->resourceGroupName, $this->sgName);
            $this->assertTrue($delete);
        } catch (Exception $e) {
        }
        try {
            $this->azure->network->interface->getInfo($this->subscriptionId, $this->resourceGroupName, $this->nicName);
            $delete = $this->azure->network->interface->delete($this->subscriptionId, $this->resourceGroupName, $this->nicName);
            $this->assertTrue($delete);
        } catch (Exception $e) {
        }
        try {
            $this->azure->network->virtualNetwork->getInfo($this->subscriptionId, $this->resourceGroupName, $this->vnName);
            $delete = $this->azure->network->virtualNetwork->delete($this->subscriptionId, $this->resourceGroupName, $this->vnName);
            $this->assertTrue($delete);
        } catch (Exception $e) {
        }
        try {
            $this->azure->storage->account->getProperties($this->subscriptionId, $this->resourceGroupName, $this->storageName);
            $delete = $this->azure->storage->account->delete($this->subscriptionId, $this->resourceGroupName, $this->storageName);
            $this->assertTrue($delete);
        } catch (Exception $e) {
        }
        try {
            $this->azure->compute->virtualMachine->getInstanceViewInfo($this->subscriptionId, $this->resourceGroupName, $this->vmName);
            $delete = $this->azure->compute->virtualMachine->delete($this->subscriptionId, $this->resourceGroupName, $this->vmName);
            $this->assertTrue($delete);
        } catch (Exception $e) {
        }
    }