Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename delete to deleteByBlah to align with getByBlahs #1236

Merged
merged 4 commits into from
Oct 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;

/**
Expand All @@ -27,7 +27,7 @@ public interface BatchAccounts extends
SupportsListingByGroup<BatchAccount>,
SupportsGettingByGroup<BatchAccount>,
SupportsGettingById<BatchAccount>,
SupportsDeleting,
SupportsDeletingById,
SupportsDeletingByGroup,
SupportsBatchCreation<BatchAccount> {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected BatchAccountsImpl(
}

@Override
public Observable<Void> deleteAsync(String groupName, String name) {
public Observable<Void> deleteByGroupAsync(String groupName, String name) {
return this.innerCollection.deleteAsync(groupName, name);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
package com.microsoft.azure.management.batch;

import com.microsoft.azure.CloudException;
import com.microsoft.azure.management.resources.ResourceGroup;
import com.microsoft.azure.management.resources.fluentcore.arm.Region;
import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils;
import org.joda.time.DateTime;
Expand All @@ -30,7 +29,7 @@ public static void setup() throws Exception {

@AfterClass
public static void cleanup() throws Exception {
resourceManager.resourceGroups().delete(RG_NAME);
resourceManager.resourceGroups().deleteByName(RG_NAME);
}

@Test
Expand Down Expand Up @@ -165,7 +164,7 @@ public void canCRUDBatchAccount() throws Exception {
.withoutApplicationPackage(applicationPackage1Name)
.parent()
.apply();
batchManager.batchAccounts().delete(batchAccount.resourceGroupName(), batchAccount.name());
batchManager.batchAccounts().deleteByGroup(batchAccount.resourceGroupName(), batchAccount.name());
try {
batchManager.batchAccounts().getById(batchAccount.id());
Assert.assertTrue(false);
Expand Down Expand Up @@ -217,7 +216,7 @@ public void canCreateBatchAccountWithApplication() throws Exception {
Assert.assertEquals(application.displayName(), applicationDisplayName);
Assert.assertEquals(application.updatesAllowed(), allowUpdates);

batchManager.batchAccounts().delete(batchAccount.resourceGroupName(), batchAccount.name());
batchManager.batchAccounts().deleteByGroup(batchAccount.resourceGroupName(), batchAccount.name());
try {
batchManager.batchAccounts().getById(batchAccount.id());
Assert.assertTrue(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;

/**
Expand All @@ -20,7 +20,7 @@ public interface AvailabilitySets extends
SupportsGettingById<AvailabilitySet>,
SupportsListing<AvailabilitySet>,
SupportsCreating<AvailabilitySet.DefinitionStages.Blank>,
SupportsDeleting,
SupportsDeletingById,
SupportsDeletingByGroup,
SupportsBatchCreation<AvailabilitySet> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;

import java.io.IOException;
Expand All @@ -23,7 +23,7 @@ public interface VirtualMachineScaleSets extends
SupportsGettingByGroup<VirtualMachineScaleSet>,
SupportsGettingById<VirtualMachineScaleSet>,
SupportsCreating<VirtualMachineScaleSet.DefinitionStages.Blank>,
SupportsDeleting,
SupportsDeletingById,
SupportsDeletingByGroup,
SupportsBatchCreation<VirtualMachineScaleSet> {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;

/**
Expand All @@ -20,7 +20,7 @@ public interface VirtualMachines extends
SupportsGettingByGroup<VirtualMachine>,
SupportsGettingById<VirtualMachine>,
SupportsCreating<VirtualMachine.DefinitionStages.Blank>,
SupportsDeleting,
SupportsDeletingById,
SupportsDeletingByGroup,
SupportsBatchCreation<VirtualMachine> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public AvailabilitySetImpl define(String name) {
}

@Override
public Observable<Void> deleteAsync(String groupName, String name) {
public Observable<Void> deleteByGroupAsync(String groupName, String name) {
return this.innerCollection.deleteAsync(groupName, name);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public PagedList<VirtualMachineScaleSet> list() {
}

@Override
public Observable<Void> deleteAsync(String groupName, String name) {
public Observable<Void> deleteByGroupAsync(String groupName, String name) {
return this.innerCollection.deleteAsync(groupName, name);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public VirtualMachine getByGroup(String groupName, String name) {
}

@Override
public Observable<Void> deleteAsync(String groupName, String name) {
public Observable<Void> deleteByGroupAsync(String groupName, String name) {
return this.innerCollection.deleteAsync(groupName, name);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static void setup() throws Exception {

@AfterClass
public static void cleanup() throws Exception {
resourceManager.resourceGroups().delete(RG_NAME);
resourceManager.resourceGroups().deleteByName(RG_NAME);
}

@Test
Expand Down Expand Up @@ -62,6 +62,6 @@ public void canCreateVirtualMachine() throws Exception {
Assert.assertNotNull(instanceView.statuses().size() > 0);

// Delete VM
computeManager.virtualMachines().delete(foundedVM.id());
computeManager.virtualMachines().deleteById(foundedVM.id());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static void setup() throws Exception {

@AfterClass
public static void cleanup() throws Exception {
resourceManager.resourceGroups().delete(RG_NAME);
resourceManager.resourceGroups().deleteByName(RG_NAME);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.microsoft.azure.CloudException;
import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;

import java.io.IOException;
Expand All @@ -22,7 +22,7 @@
public interface Groups extends
SupportsCreating<ActiveDirectoryGroup.DefinitionStages.Blank>,
SupportsListing<ActiveDirectoryGroup>,
SupportsDeleting {
SupportsDeletingById {
/**
* Gets the information about a group.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;

/**
Expand All @@ -22,7 +22,7 @@
public interface Vaults extends
SupportsListing<Vault>,
SupportsCreating<Vault.DefinitionStages.Blank>,
SupportsDeleting,
SupportsDeletingById,
SupportsListingByGroup<Vault>,
SupportsGettingByGroup<Vault>,
SupportsGettingById<Vault>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public Vault getByGroup(String groupName, String name) {
}

@Override
public Observable<Void> deleteAsync(String groupName, String name) {
public Observable<Void> deleteByGroupAsync(String groupName, String name) {
return this.innerCollection.deleteAsync(groupName, name);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static void setup() throws Exception {

@AfterClass
public static void cleanup() throws Exception {
//resourceManager.resourceGroups().delete(RG_NAME);
resourceManager.resourceGroups().deleteByName(RG_NAME);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;


Expand All @@ -26,7 +26,7 @@ public interface LoadBalancers extends
SupportsListingByGroup<LoadBalancer>,
SupportsGettingByGroup<LoadBalancer>,
SupportsGettingById<LoadBalancer>,
SupportsDeleting,
SupportsDeletingById,
SupportsDeletingByGroup,
SupportsBatchCreation<LoadBalancer> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;

/**
Expand All @@ -20,7 +20,7 @@ public interface NetworkInterfaces extends
SupportsListingByGroup<NetworkInterface>,
SupportsGettingByGroup<NetworkInterface>,
SupportsGettingById<NetworkInterface>,
SupportsDeleting,
SupportsDeletingById,
SupportsDeletingByGroup,
SupportsBatchCreation<NetworkInterface> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;


Expand All @@ -26,7 +26,7 @@ public interface NetworkSecurityGroups extends
SupportsListingByGroup<NetworkSecurityGroup>,
SupportsGettingByGroup<NetworkSecurityGroup>,
SupportsGettingById<NetworkSecurityGroup>,
SupportsDeleting,
SupportsDeletingById,
SupportsDeletingByGroup,
SupportsBatchCreation<NetworkSecurityGroup> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;


Expand All @@ -26,7 +26,7 @@ public interface Networks extends
SupportsListingByGroup<Network>,
SupportsGettingByGroup<Network>,
SupportsGettingById<Network>,
SupportsDeleting,
SupportsDeletingById,
SupportsDeletingByGroup,
SupportsBatchCreation<Network> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;


Expand All @@ -23,7 +23,7 @@
public interface PublicIpAddresses extends
SupportsListing<PublicIpAddress>,
SupportsCreating<PublicIpAddress.DefinitionStages.Blank>,
SupportsDeleting,
SupportsDeletingById,
SupportsListingByGroup<PublicIpAddress>,
SupportsGettingByGroup<PublicIpAddress>,
SupportsGettingById<PublicIpAddress>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;

/**
Expand All @@ -25,7 +25,7 @@ public interface RouteTables extends
SupportsListingByGroup<RouteTable>,
SupportsGettingByGroup<RouteTable>,
SupportsGettingById<RouteTable>,
SupportsDeleting,
SupportsDeletingById,
SupportsDeletingByGroup,
SupportsBatchCreation<RouteTable> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public LoadBalancerImpl getByGroup(String groupName, String name) {
}

@Override
public Observable<Void> deleteAsync(String groupName, String name) {
public Observable<Void> deleteByGroupAsync(String groupName, String name) {
return this.innerCollection.deleteAsync(groupName, name);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public NetworkInterface getByGroup(String groupName, String name) {
}

@Override
public Observable<Void> deleteAsync(String groupName, String name) {
public Observable<Void> deleteByGroupAsync(String groupName, String name) {
return this.innerCollection.deleteAsync(groupName, name);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public NetworkSecurityGroupImpl getByGroup(String groupName, String name) {
}

@Override
public Observable<Void> deleteAsync(String groupName, String name) {
public Observable<Void> deleteByGroupAsync(String groupName, String name) {
return this.innerCollection.deleteAsync(groupName, name);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public NetworkImpl getByGroup(String groupName, String name) {
}

@Override
public Observable<Void> deleteAsync(String groupName, String name) {
public Observable<Void> deleteByGroupAsync(String groupName, String name) {
return this.innerCollection.deleteAsync(groupName, name);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public PublicIpAddressImpl getByGroup(String groupName, String name) {
}

@Override
public Observable<Void> deleteAsync(String groupName, String name) {
public Observable<Void> deleteByGroupAsync(String groupName, String name) {
return this.innerCollection.deleteAsync(groupName, name);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public RouteTableImpl getByGroup(String groupName, String name) {
}

@Override
public Observable<Void> deleteAsync(String groupName, String name) {
public Observable<Void> deleteByGroupAsync(String groupName, String name) {
return this.innerCollection.deleteAsync(groupName, name);
}

Expand Down