You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2018/10/15 16:25:28 UTC
[12/15] jclouds-labs git commit: Remove deprecated Azure provider
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Deployment.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Deployment.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Deployment.java
deleted file mode 100644
index a1db92f..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Deployment.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import static com.google.common.collect.ImmutableList.copyOf;
-
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class Deployment {
-
- public enum Slot {
-
- PRODUCTION,
- STAGING,
- UNRECOGNIZED;
-
- public static Slot fromString(final String text) {
- if (text != null) {
- for (Slot slot : Slot.values()) {
- if (text.equalsIgnoreCase(slot.name())) {
- return slot;
- }
- }
- }
- return UNRECOGNIZED;
- }
- }
-
- public enum Status {
-
- RUNNING("Running"),
- SUSPENDED("Suspended"),
- RUNNING_TRANSITIONING("RunningTransitioning"),
- SUSPENDED_TRANSITIONING("SuspendedTransitioning"),
- STARTING("Starting"),
- SUSPENDING("Suspending"),
- DEPLOYING("Deploying"),
- DELETING("Deleting"),
- UNRECOGNIZED("");
-
- private final String key;
-
- private Status(final String key) {
- this.key = key;
- }
-
- public static Status fromString(final String text) {
- if (text != null) {
- for (Status status : Status.values()) {
- if (text.equalsIgnoreCase(status.key)) {
- return status;
- }
- }
- }
- return UNRECOGNIZED;
- }
- }
-
- public enum InstanceStatus {
-
- ROLE_STATE_UNKNOWN("RoleStateUnknown"),
- CREATING_VM("CreatingVM"),
- STARTING_VM("StartingVM"),
- CREATING_ROLE("CreatingRole"),
- STARTING_ROLE("StartingRole"),
- READY_ROLE("ReadyRole", false),
- BUSY_ROLE("BusyRole"),
- STOPPING_ROLE("StoppingRole"),
- STOPPING_VM("StoppingVM"),
- STOPPED_DEALLOCATED("StoppedDeallocated", false),
- PREPARING("Preparing"),
- DELETING_VM("DeletingVM"),
- STOPPED_VM("StoppedVM", false),
- RESTARTING_ROLE("RestartingRole"),
- CYCLING_ROLE("CyclingRole"),
- FAILED_STARTING_ROLE("FailedStartingRole", false),
- FAILED_STARTING_VM("FailedStartingVM", false),
- UNRESPONSIVE_ROLE("UnresponsiveRole"),
- PROVISIONING("Provisioning"),
- PROVISIONING_FAILED("ProvisioningFailed", false),
- /**
- * Not parsable into one of the above.
- */
- UNRECOGNIZED("");
-
- private final String key;
-
- private final boolean _transient;
-
- private InstanceStatus(final String key) {
- this(key, true);
- }
-
- private InstanceStatus(final String key, final boolean _transient) {
- this.key = key;
- this._transient = _transient;
- }
-
- public boolean isTransient() {
- return _transient;
- }
-
- public static InstanceStatus fromString(final String text) {
- if (text != null) {
- for (InstanceStatus status : InstanceStatus.values()) {
- if (text.equalsIgnoreCase(status.key)) {
- return status;
- }
- }
- }
- return UNRECOGNIZED;
- }
- }
-
- public enum PowerState {
-
- STARTING("Starting"),
- STARTED("Started"),
- STOPPING("Stopping"),
- STOPPED("Stopped"),
- UNKNOWN("Unknown"),
- /**
- * Not parsable into one of the above.
- */
- UNRECOGNIZED("");
-
- private final String key;
-
- private PowerState(final String key) {
- this.key = key;
- }
-
- public static PowerState fromString(final String text) {
- if (text != null) {
- for (PowerState state : PowerState.values()) {
- if (text.equalsIgnoreCase(state.key)) {
- return state;
- }
- }
- }
- return UNRECOGNIZED;
- }
- }
-
- @AutoValue
- public abstract static class VirtualIP {
-
- public abstract String address();
-
- public abstract Boolean isDnsProgrammed();
-
- public abstract String name();
-
- VirtualIP() { // For AutoValue only!
- }
-
- public static VirtualIP create(final String address, final Boolean isDnsProgrammed, final String name) {
- return new AutoValue_Deployment_VirtualIP(address, isDnsProgrammed, name);
- }
- }
-
- @AutoValue
- public abstract static class InstanceEndpoint {
-
- public abstract String name();
-
- public abstract String vip();
-
- public abstract int publicPort();
-
- public abstract int localPort();
-
- public abstract String protocol();
-
- InstanceEndpoint() { // For AutoValue only!
- }
-
- public static InstanceEndpoint create(final String name, final String vip,
- final int publicPort, final int localPort, final String protocol) {
-
- return new AutoValue_Deployment_InstanceEndpoint(name, vip, publicPort, localPort, protocol);
- }
- }
-
- @AutoValue
- public abstract static class RoleInstance {
-
- public abstract String roleName();
-
- public abstract String instanceName();
-
- public abstract InstanceStatus instanceStatus();
-
- public abstract PowerState powerState();
-
- @Nullable // null value in case of StoppedDeallocated
- public abstract Integer instanceUpgradeDomain();
-
- @Nullable // null value in case of StoppedDeallocated
- public abstract Integer instanceFaultDomain();
-
- @Nullable // null value in case of StoppedDeallocated
- public abstract RoleSize.Type instanceSize();
-
- @Nullable // null value in case of StoppedDeallocated
- public abstract String ipAddress();
-
- @Nullable
- public abstract String hostname();
-
- @Nullable
- public abstract List<InstanceEndpoint> instanceEndpoints();
-
- RoleInstance() { // For AutoValue only!
- }
-
- public static RoleInstance create(final String roleName, final String instanceName,
- final InstanceStatus instanceStatus, final PowerState powerState, final Integer instanceUpgradeDomain,
- final Integer instanceFaultDomain, final RoleSize.Type instanceSize,
- final String ipAddress, final String hostname, final List<InstanceEndpoint> instanceEndpoints) {
-
- return new AutoValue_Deployment_RoleInstance(roleName, instanceName, instanceStatus, powerState,
- instanceUpgradeDomain, instanceFaultDomain, instanceSize, ipAddress, hostname,
- instanceEndpoints == null ? null : copyOf(instanceEndpoints));
- }
- }
-
- Deployment() {
- } // For AutoValue only!
-
- /**
- * The user-supplied name for this deployment.
- */
- public abstract String name();
-
- /**
- * The environment to which the cloud service is deployed.
- */
- public abstract Slot slot();
-
- public abstract Status status();
-
- /**
- * The user-supplied name of the deployment returned as a base-64 encoded string. This name can be used identify the
- * deployment for your tracking purposes.
- */
- public abstract String label();
-
- /**
- * The instance state is returned as an English human-readable string that, when present, provides a snapshot of the
- * state of the virtual machine at the time the operation was called.
- *
- * For example, when the instance is first being initialized a "Preparing Windows for first use." could be returned.
- */
- @Nullable
- public abstract String instanceStateDetails();
-
- /**
- * Error code of the latest role or VM start
- *
- * For VMRoles the error codes are:
- *
- * WaitTimeout - The virtual machine did not communicate back to Azure infrastructure within 25 minutes. Typically
- * this indicates that the virtual machine did not start or that the guest agent is not installed.
- *
- * VhdTooLarge - The VHD image selected was too large for the virtual machine hosting the role.
- *
- * AzureInternalError – An internal error has occurred that has caused to virtual machine to fail to start. Contact
- * support for additional assistance.
- *
- * For web and worker roles this field returns an error code that can be provided to Windows Azure support to assist
- * in resolution of errors. Typically this field will be empty.
- */
- @Nullable
- public abstract String instanceErrorCode();
-
- public abstract List<VirtualIP> virtualIPs();
-
- public abstract List<RoleInstance> roleInstanceList();
-
- @Nullable
- public abstract List<Role> roleList();
-
- @Nullable
- public abstract String virtualNetworkName();
-
- public static Deployment create(final String name, final Slot slot, final Status status, final String label,
- final String instanceStateDetails, final String instanceErrorCode,
- final List<VirtualIP> virtualIPs, final List<RoleInstance> roleInstanceList,
- final List<Role> roles, final String virtualNetworkName) {
-
- return new AutoValue_Deployment(name, slot, status, label, instanceStateDetails,
- instanceErrorCode, copyOf(virtualIPs), copyOf(roleInstanceList),
- roles == null ? null : copyOf(roles), virtualNetworkName);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/DeploymentParams.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/DeploymentParams.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/DeploymentParams.java
deleted file mode 100644
index 5d0e5e6..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/DeploymentParams.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import java.net.URI;
-import java.util.List;
-import java.util.Set;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.rest.annotations.SinceApiVersion;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-
-/**
- * To create a new deployment/role
- *
- * Warning : the OSType must be the one of the source image used to create the VM
- */
-// TODO: check which can be null.
-@AutoValue
-public abstract class DeploymentParams {
-
- @AutoValue
- public abstract static class ExternalEndpoint {
-
- public abstract String name();
-
- /**
- * Either {@code tcp} or {@code udp}.
- */
- public abstract String protocol();
-
- public abstract int port();
-
- public abstract int localPort();
-
- public static ExternalEndpoint inboundTcpToLocalPort(final int port, final int localPort) {
- return new AutoValue_DeploymentParams_ExternalEndpoint(
- String.format("tcp_%s-%s", port, localPort), "tcp", port, localPort);
- }
-
- public static ExternalEndpoint inboundUdpToLocalPort(final int port, final int localPort) {
- return new AutoValue_DeploymentParams_ExternalEndpoint(
- String.format("udp_%s-%s", port, localPort), "udp", port, localPort);
- }
-
- ExternalEndpoint() { // For AutoValue only!
- }
- }
-
- DeploymentParams() {
- } // For AutoValue only!
-
- /**
- * The user-supplied name for this deployment.
- */
- public abstract String name();
-
- /**
- * The size of the virtual machine to allocate. The default value is Small.
- */
- public abstract RoleSize.Type size();
-
- /**
- * Specifies the name of a user to be created in the sudoers group of the virtual machine. User names are ASCII
- * character strings 1 to 32 characters in length.
- */
- public abstract String username();
-
- /**
- * Specifies the associated password for the user name. Passwords are ASCII character strings 6 to 72 characters in
- * length.
- */
- public abstract String password();
-
- /**
- * {@link OSImage#name() name} of the user or platform image.
- */
- public abstract String sourceImageName();
-
- /**
- * Indicates the {@link OSImage#mediaLink() location} when {@link #sourceImageName() source} is a platform image.
- */
- public abstract URI mediaLink();
-
- /**
- * {@link OSImage#os() Os type} of the {@link #sourceImageName() source image}.
- */
- public abstract OSImage.Type os();
-
- public abstract Set<ExternalEndpoint> externalEndpoints();
-
- /**
- * {@link org.jclouds.azurecompute.domain.NetworkConfiguration.VirtualNetworkSite#name}
- */
- @Nullable
- public abstract String virtualNetworkName();
-
- /**
- * Optional. Specifies the name of a reserved IP address that is to be assigned to the deployment. You must run
- * Create Reserved IP Address before you can assign the address to the deployment using this element.
- *
- * The ReservedIPName element is only available using version 2014-05-01 or higher.
- *
- * @return reserved IP.
- */
- @SinceApiVersion("2014-05-01")
- @Nullable
- public abstract String reservedIPName();
-
- public abstract List<String> subnetNames();
-
- /**
- * Optional. Indicates whether the VM Agent is installed on the Virtual
- * Machine. To run a resource extension in a Virtual Machine, this agent must
- * be installed.
- *
- * @return provisionGuestAgent true/false flag (or null)
- */
- @Nullable
- public abstract Boolean provisionGuestAgent();
-
- /**
- * Optional. Indicates whether Windows VM should be provisioned with Https WinRm listener.
- * By default it will use http listener.
- */
- @Nullable
- public abstract Boolean winrmUseHttps();
-
- public static Builder builder() {
- return new AutoValue_DeploymentParams.Builder()
- .externalEndpoints(ImmutableSet.<ExternalEndpoint> of())
- .subnetNames(ImmutableList.<String> of());
- }
-
- abstract Builder toBuilder();
-
- @AutoValue.Builder
- public abstract static class Builder {
- public abstract Builder name(String name);
- public abstract Builder size(RoleSize.Type roleSize);
- public abstract Builder username(String username);
- public abstract Builder password(String password);
- public abstract Builder winrmUseHttps(Boolean useHttps);
- public abstract Builder sourceImageName(String sourceImageName);
- public abstract Builder mediaLink(URI mediaLink);
- public abstract Builder os(OSImage.Type os);
- public abstract Builder externalEndpoints(Set<ExternalEndpoint> externalEndpoints);
- public abstract Builder virtualNetworkName(String virtualNetworkName);
- public abstract Builder reservedIPName(String reservedIPName);
- public abstract Builder subnetNames(List<String> subnetNames);
- public abstract Builder provisionGuestAgent(Boolean provisionGuestAgent);
-
- abstract Set<ExternalEndpoint> externalEndpoints();
- abstract List<String> subnetNames();
-
- abstract DeploymentParams autoBuild();
-
- public DeploymentParams build() {
- externalEndpoints(externalEndpoints() != null ? ImmutableSet.copyOf(externalEndpoints()) : null);
- subnetNames(subnetNames() != null ? ImmutableList.copyOf(subnetNames()) : null);
- return autoBuild();
- }
- }
-
- public static DeploymentParams create(String name, RoleSize.Type size, String username,
- String password, String sourceImageName, URI mediaLink,
- OSImage.Type os, Set<ExternalEndpoint> externalEndpoints,
- String virtualNetworkName, String reservedIPName,
- List<String> subnetNames, Boolean provisionGuestAgent) {
- return builder().name(name).size(size).username(username).password(password)
- .sourceImageName(sourceImageName).mediaLink(mediaLink).os(os)
- .externalEndpoints(externalEndpoints).virtualNetworkName(virtualNetworkName)
- .reservedIPName(reservedIPName).subnetNames(subnetNames)
- .provisionGuestAgent(provisionGuestAgent)
- .build();
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Disk.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Disk.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Disk.java
deleted file mode 100644
index 7ce31e1..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Disk.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import java.net.URI;
-
-import org.jclouds.javax.annotation.Nullable;
-
-import com.google.auto.value.AutoValue;
-
-/**
- * A disk in the image repository.
- *
- * @see <a href="http://msdn.microsoft.com/en-us/library/jj157176" >api</a>
- */
-@AutoValue
-public abstract class Disk {
-
- Disk() {
- } // For AutoValue only!
-
- @AutoValue
- public abstract static class Attachment {
-
- Attachment() {
- } // For AutoValue only!
-
- /**
- * The cloud service in which the disk is being used.
- */
- public abstract String hostedService();
-
- /**
- * The deployment in which the disk is being used.
- */
- public abstract String deployment();
-
- /**
- * The virtual machine that the disk is attached to.
- */
- public abstract String virtualMachine();
-
- public static Attachment create(
- final String hostedService, final String deployment, final String virtualMachine) {
-
- return new AutoValue_Disk_Attachment(hostedService, deployment, virtualMachine);
- }
- }
-
- /**
- * The name of the disk. This is the name that is used when creating one or more virtual machines using the disk.
- */
- public abstract String name();
-
- /**
- * The geo-location of the disk in Windows Azure, if the disk is not associated with an affinity group. If a location
- * has been specified, the AffinityGroup element is not returned.
- */
- @Nullable
- public abstract String location();
-
- /**
- * The affinity group with which this disk is associated, if any. If the service is associated with an affinity
- * group, the Location element is not returned.
- */
- @Nullable
- public abstract String affinityGroup();
-
- @Nullable
- public abstract String description();
-
- /**
- * The operating system type of the OS image, or null if a data disk.
- */
- @Nullable
- public abstract OSImage.Type os();
-
- /**
- * The location of the blob in the blob store in which the media for the image is located. The blob location belongs
- * to a storage account in the subscription specified by the
- * <subscription-id> value in the operation call.
- *
- * Example:
- *
- * http://example.blob.core.windows.net/disks/myimage.vhd
- */
- @Nullable
- public abstract URI mediaLink();
-
- @Nullable
- public abstract Integer logicalSizeInGB();
-
- /**
- * Contains properties that specify a virtual machine that currently using the disk. A disk cannot be deleted as long
- * as it is attached to a virtual machine.
- */
- @Nullable
- public abstract Attachment attachedTo();
-
- /**
- * The name of the OS Image from which the disk was created. This property is populated automatically when a disk is
- * created from an OS image by calling the Add Role, Create Deployment, or Provision Disk operations.
- */
- @Nullable
- public abstract String sourceImage();
-
- public static Disk create(final String name, final String location, final String affinityGroup,
- final String description, final OSImage.Type os,
- final URI mediaLink, final Integer logicalSizeInGB, final Attachment attachedTo, final String sourceImage) {
-
- return new AutoValue_Disk(
- name, location, affinityGroup, description, os, mediaLink, logicalSizeInGB, attachedTo, sourceImage);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Error.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Error.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Error.java
deleted file mode 100644
index 1da089a..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Error.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import com.google.auto.value.AutoValue;
-
-/**
- * @see <a href="http://msdn.microsoft.com/en-us/library/ee460801" >api</a>
- */
-@AutoValue
-public abstract class Error {
-
- public static enum Code {
-
- MISSING_OR_INCORRECT_VERSION_HEADER,
- INVALID_XML_REQUEST,
- MISSING_OR_INVALID_REQUIRED_QUERY_PARAMETER,
- INVALID_HTTP_VERB,
- AUTHENTICATION_FAILED,
- RESOURCE_NOT_FOUND,
- INTERNAL_ERROR,
- OPERATION_TIMED_OUT,
- SERVER_BUSY,
- SUBSCRIPTION_DISABLED,
- BAD_REQUEST,
- CONFLICT_ERROR,
- UNRECOGNIZED;
-
- public static Code fromString(final String text) {
- if (text != null) {
- for (Code code : Code.values()) {
- if (text.equalsIgnoreCase(code.name())) {
- return code;
- }
- }
- }
- return UNRECOGNIZED;
- }
- }
-
- Error() {
- } // For AutoValue only!
-
- /**
- * Error code
- */
- public abstract Code code();
-
- /**
- * User message
- */
- public abstract String message();
-
- public static Error create(final Code code, final String message) {
- return new AutoValue_Error(code, message);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Location.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Location.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Location.java
deleted file mode 100644
index 3ace3ee..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Location.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import static com.google.common.collect.ImmutableList.copyOf;
-
-import java.util.List;
-
-import com.google.auto.value.AutoValue;
-import org.jclouds.javax.annotation.Nullable;
-
-/**
- * A data center location that is valid for your subscription.
- */
-@AutoValue
-public abstract class Location {
-
- Location() {
- } // For AutoValue only!
-
- /**
- * The name of the data center location. Ex. {@code West Europe}.
- */
- public abstract String name();
-
- /**
- * The localized name of the data center location.
- */
- public abstract String displayName();
-
- /**
- * Indicates the services available at this location. Ex. {@code Compute}.
- */
- public abstract List<String> availableServices();
-
- /**
- * Specifies the roles sizes that are available for deployments in the location.
- */
- @Nullable
- public abstract ComputeCapabilities computeCapabilities();
-
- public static Location create(final String name, final String displayName, final List<String> availableServices,
- final ComputeCapabilities computeCapabilities) {
-
- return new AutoValue_Location(name, displayName, copyOf(availableServices), computeCapabilities);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/NetworkConfiguration.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/NetworkConfiguration.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/NetworkConfiguration.java
deleted file mode 100644
index 86c7027..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/NetworkConfiguration.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import static com.google.common.collect.ImmutableList.copyOf;
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class NetworkConfiguration {
-
- @AutoValue
- public abstract static class Subnet {
-
- Subnet() {
- } // For AutoValue only!
-
- public abstract String name();
-
- @Nullable
- public abstract String addressPrefix();
-
- @Nullable
- public abstract String networkSecurityGroup();
-
- public static Subnet create(final String name, final String addressPrefix, final String networkSecurityGroup) {
- return new AutoValue_NetworkConfiguration_Subnet(name, addressPrefix, networkSecurityGroup);
- }
- }
-
- @AutoValue
- public abstract static class AddressSpace {
-
- AddressSpace() {
- } // For AutoValue only!
-
- @Nullable
- public abstract String addressPrefix();
-
- public static AddressSpace create(final String addressPrefix) {
- return new AutoValue_NetworkConfiguration_AddressSpace(addressPrefix);
- }
- }
-
- @AutoValue
- public abstract static class VirtualNetworkSite {
-
- VirtualNetworkSite() {
- } // For AutoValue only!
-
- @Nullable
- public abstract String id();
-
- @Nullable
- public abstract String name();
-
- @Nullable
- public abstract String location();
-
- public abstract AddressSpace addressSpace();
-
- public abstract List<Subnet> subnets();
-
- public static VirtualNetworkSite create(
- final String id, final String name, final String location,
- final AddressSpace addressSpace, final List<Subnet> subnets) {
-
- return new AutoValue_NetworkConfiguration_VirtualNetworkSite(id, name, location, addressSpace, subnets);
- }
-
- }
-
- @AutoValue
- public abstract static class VirtualNetworkConfiguration {
-
- VirtualNetworkConfiguration() {
- } // For AutoValue only!
-
- @Nullable
- public abstract String dns();
-
- @Nullable
- public abstract List<VirtualNetworkSite> virtualNetworkSites();
-
- public static VirtualNetworkConfiguration create(
- final String dns, final List<VirtualNetworkSite> virtualNetworkSites) {
-
- return new AutoValue_NetworkConfiguration_VirtualNetworkConfiguration(dns, copyOf(virtualNetworkSites));
- }
- }
-
- public NetworkConfiguration() {
- } // For AutoValue only!
-
- public abstract VirtualNetworkConfiguration virtualNetworkConfiguration();
-
- public static NetworkConfiguration create(final VirtualNetworkConfiguration virtualNetworkConfiguration) {
- return new AutoValue_NetworkConfiguration(virtualNetworkConfiguration);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/NetworkSecurityGroup.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/NetworkSecurityGroup.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/NetworkSecurityGroup.java
deleted file mode 100644
index 1d490a7..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/NetworkSecurityGroup.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.collect.ImmutableList;
-
-@AutoValue
-public abstract class NetworkSecurityGroup {
-
- public enum State {
-
- CREATED,
- CREATING,
- UPDATING,
- DELETING,
- UNAVAILABLE,
- UNRECOGNIZED;
-
- public static State fromString(final String text) {
- if (text != null) {
- for (State status : State.values()) {
- if (text.equalsIgnoreCase(status.name())) {
- return status;
- }
- }
- }
- return UNRECOGNIZED;
- }
- }
-
- NetworkSecurityGroup() {
- } // For AutoValue only!
-
- public abstract String name();
-
- @Nullable
- public abstract String label();
-
- @Nullable
- public abstract String location();
-
- @Nullable
- public abstract State state();
-
- @Nullable
- public abstract List<Rule> rules();
-
- public static NetworkSecurityGroup create(final String name) {
- return new AutoValue_NetworkSecurityGroup(name, null, null, null, null);
- }
-
- public static NetworkSecurityGroup create(
- final String name, final String label, String location, final State state, final List<Rule> rules) {
-
- return new AutoValue_NetworkSecurityGroup(
- name,
- label,
- location,
- state,
- rules == null ? ImmutableList.<Rule>of() : ImmutableList.copyOf(rules));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/OSImage.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/OSImage.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/OSImage.java
deleted file mode 100644
index 4fb7a41..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/OSImage.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import static com.google.common.collect.ImmutableList.copyOf;
-import java.net.URI;
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-
-import com.google.auto.value.AutoValue;
-
-/**
- * OS image from the image repository
- *
- * @see <a href="http://msdn.microsoft.com/en-us/library/jj157191">api</a>
- */
-@AutoValue
-public abstract class OSImage {
-
- public enum Type {
-
- LINUX,
- WINDOWS;
-
- }
-
- OSImage() {
- } // For AutoValue only!
-
- public abstract String name();
-
- /**
- * The geo-locations of the image, if the image is not associated with an affinity group.
- */
- @Nullable
- public abstract String location();
-
- /**
- * The affinity group with which this image is associated, if any.
- */
- @Nullable
- public abstract String affinityGroup();
-
- /**
- * The name can be up to 100 characters in length. The name can be used identify the storage account for your
- * tracking purposes.
- */
- public abstract String label();
-
- @Nullable
- public abstract String description();
-
- /**
- * Specifies a value that can be used to group images.
- *
- * @return value that can be used to group images
- */
- @Nullable
- public abstract String imageFamily();
-
- /**
- * The repository classification of image. All user images have the category "User", but categories for other images
- * could be, for example "Canonical"
- */
- @Nullable
- public abstract String category();
-
- /**
- * The operating system type of the OS image.
- */
- public abstract Type os();
-
- //The name of the publisher of the image. All user images have a publisher name of User.
- @Nullable
- public abstract String publisherName();
-
- /**
- * The locations of the blob in the blob store in which the media for the image is located. The blob locations
- * belongs to a storage account in the subscription specified by the
- * <subscription-id> value in the operation call.
- *
- * Example:
- *
- * http://example.blob.core.windows.net/disks/myimage.vhd
- */
- @Nullable
- public abstract URI mediaLink();
-
- public abstract int logicalSizeInGB();
-
- /**
- * The eulas for the image, if available.
- */
- // Not URI as some providers put non-uri data in, such as riverbed.
- public abstract List<String> eula();
-
- public static OSImage create(final String name, final String location, final String affinityGroup, final String label,
- final String description, final String imageFamily, final String category, final Type os,
- final String publisherName, final URI mediaLink, final int logicalSizeInGB, final List<String> eula) {
-
- return new AutoValue_OSImage(name, location, affinityGroup, label, description, imageFamily, category, os,
- publisherName, mediaLink, logicalSizeInGB, copyOf(eula));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/OSImageParams.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/OSImageParams.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/OSImageParams.java
deleted file mode 100644
index 6c85696..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/OSImageParams.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import java.net.URI;
-
-import com.google.auto.value.AutoValue;
-
-/**
- * To create a new operating system image.
- */
-@AutoValue
-public abstract class OSImageParams {
-
- OSImageParams() {
- } // For AutoValue only!
-
- /**
- * Specifies a name that is used to identify the image when you create a Virtual Machine.
- */
- public abstract String name();
-
- /**
- * Specifies the friendly name of the image.
- */
- public abstract String label();
-
- /**
- * Specifies the location of the vhd file for the image.
- */
- public abstract URI mediaLink();
-
- /**
- * {@link OSImage#os() Os type} of the image.
- */
- public abstract OSImage.Type os();
-
- public Builder toBuilder() {
- return builder().fromImageParams(this);
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static final class Builder {
-
- private String name;
-
- private String label;
-
- private URI mediaLink;
-
- private OSImage.Type os;
-
- public Builder name(final String name) {
- this.name = name;
- return this;
- }
-
- public Builder label(final String label) {
- this.label = label;
- return this;
- }
-
- public Builder mediaLink(final URI mediaLink) {
- this.mediaLink = mediaLink;
- return this;
- }
-
- public Builder os(final OSImage.Type os) {
- this.os = os;
- return this;
- }
-
- public OSImageParams build() {
- return OSImageParams.create(name, label, mediaLink, os);
- }
-
- public Builder fromImageParams(final OSImageParams in) {
- return name(in.name())
- .label(in.label())
- .mediaLink(in.mediaLink())
- .os(in.os());
- }
- }
-
- private static OSImageParams create(
- final String name, final String label, final URI mediaLink, final OSImage.Type os) {
-
- return new AutoValue_OSImageParams(name, label, mediaLink, os);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Operation.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Operation.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Operation.java
deleted file mode 100644
index aefa470..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Operation.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import org.jclouds.javax.annotation.Nullable;
-
-import com.google.auto.value.AutoValue;
-
-/**
- *
- * Determines whether the asynchronous operation has succeeded, failed, or is still in progress.
- *
- * @see <a href="http://msdn.microsoft.com/en-us/library/ee460783" >api</a>
- */
-@AutoValue
-public abstract class Operation {
-
- public enum Status {
-
- IN_PROGRESS,
- SUCCEEDED,
- FAILED,
- UNRECOGNIZED;
-
- public static Status fromString(final String text) {
- if (text != null) {
- for (Status status : Status.values()) {
- if (text.equalsIgnoreCase(status.name())) {
- return status;
- }
- }
- }
- return UNRECOGNIZED;
- }
- }
-
- Operation() {
- } // For AutoValue only!
-
- public abstract String id();
-
- public abstract Status status();
-
- @Nullable
- public abstract Integer httpStatusCode();
-
- /**
- * Present when the operation {@link Status#FAILED failed}.
- */
- @Nullable
- public abstract Error error();
-
- public static Operation create(
- final String id, final Status status, final Integer httpStatusCode, final Error error) {
-
- return new AutoValue_Operation(id, status, httpStatusCode, error);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Profile.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Profile.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Profile.java
deleted file mode 100644
index 7d166f8..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Profile.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import com.google.auto.value.AutoValue;
-import java.util.Map;
-import org.jclouds.javax.annotation.Nullable;
-
-/**
- * Traffic Maager profile.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/hh758255.aspx" >Traffic Manager operations</a>
- */
-@AutoValue
-public abstract class Profile {
-
- Profile() {
- } // For AutoValue only!
-
- /**
- * Specifies the domain name, as specified during the creation of the profile.
- *
- * @return domain nae.
- */
- public abstract String domain();
-
- /**
- * Specifies the profile name.
- *
- * @return profile name.
- */
- public abstract String name();
-
- /**
- * Indicates whether a definition of the specified profile is enabled or disabled in Azure Traffic Manager. Possible
- * values are: Enabled, Disabled.
- *
- * @return profile definition status.
- */
- public abstract ProfileDefinition.Status status();
-
- /**
- * Specifies the version of the enabled definition. This value is always 1.
- *
- * @return version.
- */
- @Nullable
- public abstract String version();
-
- /**
- * Specifies the definition for the specified profile, along with the status. Only one definition version exists for
- * a profile.
- *
- * @return profile definitions in terms of version-status pairs;
- */
- public abstract Map<String, ProfileDefinition.Status> definitions();
-
- public static Profile create(
- final String domain,
- final String name,
- final ProfileDefinition.Status status,
- final String version,
- final Map<String, ProfileDefinition.Status> definitions) {
-
- return new AutoValue_Profile(domain, name, status, version, definitions);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinition.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinition.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinition.java
deleted file mode 100644
index df0190f..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinition.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.collect.ImmutableList;
-import java.util.List;
-
-/**
- * Cloud service certifcate.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/ee795178.aspx" >ServiceCertificate</a>
- */
-@AutoValue
-public abstract class ProfileDefinition {
-
- public static enum Status {
-
- UNRECOGNIZED(""),
- ENABLED("Enabled"),
- DISABLED("Disabled");
-
- private final String value;
-
- private Status(final String value) {
- this.value = value;
- }
-
- public static Status fromString(final String value) {
- for (Status status : Status.values()) {
- if (status.value.equalsIgnoreCase(value)) {
- return status;
- }
- }
- return UNRECOGNIZED;
- }
-
- public String getValue() {
- return value;
- }
- }
-
- public static enum LBMethod {
-
- UNRECOGNIZED(""),
- PERFORMANCE("Performance"),
- FAILOVER("Failover"),
- ROUNDROBIN("RoundRobin");
-
- private final String value;
-
- private LBMethod(final String value) {
- this.value = value;
- }
-
- public static LBMethod fromString(final String value) {
- for (LBMethod lb : LBMethod.values()) {
- if (lb.value.equalsIgnoreCase(value)) {
- return lb;
- }
- }
- return UNRECOGNIZED;
- }
-
- public String getValue() {
- return value;
- }
- }
-
- public static enum Protocol {
-
- UNRECOGNIZED, HTTP, HTTPS;
-
- public static Protocol fromString(final String value) {
- for (Protocol protocol : Protocol.values()) {
- if (protocol.name().equalsIgnoreCase(value)) {
- return protocol;
- }
- }
- return UNRECOGNIZED;
- }
- }
-
- public static enum HealthStatus {
-
- UNRECOGNIZED(""),
- ONLINE("Online"),
- DEGRADED("Degraded"),
- INACTIVE("Inactive"),
- DISABLED("Disabled"),
- STOPPED("Stopped"),
- CHECKINGENDPOINT("CheckingEndpoint");
-
- private final String value;
-
- private HealthStatus(final String value) {
- this.value = value;
- }
-
- public static HealthStatus fromString(final String value) {
- for (HealthStatus status : HealthStatus.values()) {
- if (status.value.equalsIgnoreCase(value)) {
- return status;
- }
- }
- return UNRECOGNIZED;
- }
-
- public String getValue() {
- return value;
- }
- }
-
- ProfileDefinition() {
- } // For AutoValue only!
-
- /**
- * Specifies the DNS Time-To-Live (TTL) that informs the Local DNS resolvers how long to cache DNS entries. The value
- * is an integer from 30 through 999,999.
- *
- * @return DNS cache Time-To-Live (TTL)
- */
- public abstract int ttl();
-
- /**
- * Indicates whether this definition is enabled or disabled for the profile. Possible values are: Enabled, Disabled.
- *
- * @return profile definition status.
- */
- public abstract Status status();
-
- /**
- * Specifies the version of the definition. This value is always 1.
- *
- * @return version.
- */
- public abstract String version();
-
- /**
- * Encapsulates the list of Azure Traffic Manager endpoint monitors. You have to define just 1 monitor in the list.
- *
- * @return profile definition monitors;
- */
- public abstract List<ProfileDefinitionMonitor> monitors();
-
- /**
- * Specifies the load balancing method to use to distribute connection. Possible values are: Performance, Failover,
- * RoundRobin
- *
- * @return load balancing method..
- */
- public abstract LBMethod lb();
-
- /**
- * Encapsulates the list of Azure Traffic Manager endpoints. You can define up to 100 endpoints in the list.
- *
- * @return endpoints.
- * @see EndpointParams
- */
- public abstract List<ProfileDefinitionEndpoint> endpoints();
-
- /**
- * When defined as part of a policy, indicates the health status for the overall load balancing policy. Possible
- * values are: Online, Degraded, Inactive, Disabled, CheckingEndpoints.
- *
- * When defined as part of an endpoint, indicates the health status for the endpoint. Possible values are: Online,
- * Degraded, Inactive, Disabled, Stopped, CheckingEndpoint.
- *
- * @return endpoint health status.
- */
- public abstract ProfileDefinition.HealthStatus healthStatus();
-
- public static ProfileDefinition create(
- final int ttl,
- final Status status,
- final String version,
- final List<ProfileDefinitionMonitor> monitors,
- final LBMethod lb,
- final List<ProfileDefinitionEndpoint> endpoints,
- final ProfileDefinition.HealthStatus healthStatus) {
-
- return new AutoValue_ProfileDefinition(
- ttl, status, version, ImmutableList.copyOf(monitors), lb, ImmutableList.copyOf(endpoints), healthStatus);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionEndpoint.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionEndpoint.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionEndpoint.java
deleted file mode 100644
index e846a79..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionEndpoint.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import com.google.auto.value.AutoValue;
-import org.jclouds.azurecompute.domain.ProfileDefinition.HealthStatus;
-import org.jclouds.javax.annotation.Nullable;
-
-/**
- * Encapsulates the list of Azure Traffic Manager endpoints. You can define up to 100 endpoints in the list.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/hh758257.aspx">docs</a>
- */
-@AutoValue
-public abstract class ProfileDefinitionEndpoint {
-
- public static enum Type {
-
- UNRECOGNIZED(""),
- CLOUDSERVICE("CloudService"),
- AZUREWEBSITE("AzureWebsite"),
- ANY("Any"),
- TRAFFICMANAGER("TrafficManager");
-
- private final String value;
-
- private Type(final String value) {
- this.value = value;
- }
-
- public static Type fromString(final String value) {
- for (Type type : Type.values()) {
- if (type.value.equalsIgnoreCase(value)) {
- return type;
- }
- }
- return UNRECOGNIZED;
- }
-
- public String getValue() {
- return value;
- }
- }
-
- ProfileDefinitionEndpoint() {
- } // For AutoValue only!
-
- /**
- * Specifies the endpoint domain name. The value depends on endpoint type. If Type is CloudService, the value must be
- * a fully qualified domain name (FQDN) of a cloud service that belongs to the subscription ID that owns the
- * definition. If Type is AzureWebsite, the value must be an FQDN of an Azure web site that belongs to the
- * subscription ID that owns the definition. If Type is Any, the value can be any FQDN for an Azure service or a
- * service outside of Azure.
- *
- * @return endpoint domain name.
- */
- public abstract String domain();
-
- /**
- * Specifies the status of the monitoring endpoint. If set to Enabled, the endpoint is considered by the load
- * balancing method and is monitored. Possible values are:Enabled, Disabled
- *
- * @return status of the monitoring endpoint.
- */
- public abstract ProfileDefinition.Status status();
-
- /**
- * When defined as part of a policy, indicates the health status for the overall load balancing policy. Possible
- * values are: Online, Degraded, Inactive, Disabled, CheckingEndpoints.
- *
- * When defined as part of an endpoint, indicates the health status for the endpoint. Possible values are: Online,
- * Degraded, Inactive, Disabled, Stopped, CheckingEndpoint.
- *
- * @return endpoint health status.
- */
- public abstract ProfileDefinition.HealthStatus healthStatus();
-
- /**
- * Optional. Specifies the type of endpoint being added to the definition. Possible values are: CloudService,
- * AzureWebsite, Any, TrafficManager.
- *
- * If there is more than one AzureWebsite endpoint, they must be in different datacenters. This limitation doesn’t
- * apply to cloud services. The default value is CloudService. Use the TrafficManager type when configuring nested
- * profiles..
- *
- * @return endpoint type.
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/hh744833.aspx">Traffic Manager Overview</a>
- */
- public abstract Type type();
-
- /**
- * Required when LoadBalancingMethod is set to Performance and Type is set to Any or TrafficManager. Specifies the
- * name of the Azure region. The Location cannot be specified for endpoints of type CloudService or AzureWebsite, in
- * which the locations are determined from the service.
- *
- * @return endpoint protocol.
- * @see <a href="https://msdn.microsoft.com/en-us/library/gg441293.aspx">List Locations</a>
- */
- @Nullable
- public abstract String location();
-
- /**
- * Optional. Specifies the priority of the endpoint in load balancing. The higher the weight, the more frequently the
- * endpoint will be made available to the load balancer. The value must be greater than 0. For endpoints that do not
- * specify a weight value, a default weight of 1 will be used.
- *
- * @return
- */
- @Nullable
- public abstract Integer weight();
-
- /**
- * Optional. Can be specified when Type is set to TrafficManager. The minimum number of healthy endpoints within a
- * nested profile that determines whether any of the endpoints within that profile can receive traffic. Default value
- * is 1.
- *
- * @return minimum number of healthy endpoints.
- */
- @Nullable
- public abstract Integer min();
-
- public static ProfileDefinitionEndpoint create(
- final String domain,
- final ProfileDefinition.Status status,
- final HealthStatus healthStatus,
- final Type type,
- final String location,
- final Integer weight,
- final Integer min) {
-
- return new AutoValue_ProfileDefinitionEndpoint(
- domain, status, healthStatus, type, location, weight, min);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionEndpointParams.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionEndpointParams.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionEndpointParams.java
deleted file mode 100644
index 34173f9..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionEndpointParams.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import com.google.auto.value.AutoValue;
-import org.jclouds.azurecompute.domain.ProfileDefinition.Status;
-import org.jclouds.azurecompute.domain.ProfileDefinitionEndpoint.Type;
-import org.jclouds.javax.annotation.Nullable;
-
-/**
- * Encapsulates the list of Azure Traffic Manager endpoints. You can define up to 100 endpoints in the list.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/hh758257.aspx">docs</a>
- */
-@AutoValue
-public abstract class ProfileDefinitionEndpointParams {
-
- ProfileDefinitionEndpointParams() {
- } // For AutoValue only!
-
- /**
- * Specifies the endpoint domain name. The value depends on endpoint type. If Type is CloudService, the value must be
- * a fully qualified domain name (FQDN) of a cloud service that belongs to the subscription ID that owns the
- * definition. If Type is AzureWebsite, the value must be an FQDN of an Azure web site that belongs to the
- * subscription ID that owns the definition. If Type is Any, the value can be any FQDN for an Azure service or a
- * service outside of Azure.
- *
- * @return endpoint domain name.
- */
- public abstract String domain();
-
- /**
- * Specifies the status of the monitoring endpoint. If set to Enabled, the endpoint is considered by the load
- * balancing method and is monitored. Possible values are:Enabled, Disabled
- *
- * @return status of the monitoring endpoint.
- */
- public abstract Status status();
-
- /**
- * Optional. Specifies the type of endpoint being added to the definition. Possible values are: CloudService,
- * AzureWebsite, Any, TrafficManager.
- *
- * If there is more than one AzureWebsite endpoint, they must be in different datacenters. This limitation doesn’t
- * apply to cloud services. The default value is CloudService. Use the TrafficManager type when configuring nested
- * profiles..
- *
- * @return endpoint type.
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/hh744833.aspx">Traffic Manager Overview</a>
- */
- @Nullable
- public abstract Type type();
-
- /**
- * Required when LoadBalancingMethod is set to Performance and Type is set to Any or TrafficManager. Specifies the
- * name of the Azure region. The Location cannot be specified for endpoints of type CloudService or AzureWebsite, in
- * which the locations are determined from the service.
- *
- * @return endpoint protocol.
- * @see <a href="https://msdn.microsoft.com/en-us/library/gg441293.aspx">List Locations</a>
- */
- @Nullable
- public abstract String location();
-
- /**
- * Optional. Can be specified when Type is set to TrafficManager. The minimum number of healthy endpoints within a
- * nested profile that determines whether any of the endpoints within that profile can receive traffic. Default value
- * is 1.
- *
- * @return minimum number of healthy endpoints.
- */
- @Nullable
- public abstract Integer min();
-
- /**
- * Optional. Specifies the priority of the endpoint in load balancing. The higher the weight, the more frequently the
- * endpoint will be made available to the load balancer. The value must be greater than 0. For endpoints that do not
- * specify a weight value, a default weight of 1 will be used.
- *
- * @return endpoint priority.
- */
- @Nullable
- public abstract Integer weight();
-
- public Builder toBuilder() {
- return builder().fromImageParams(this);
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static final class Builder {
-
- private String domain;
-
- private Status status;
-
- private Type type;
-
- private String location;
-
- private Integer min;
-
- private Integer weight;
-
- public Builder domain(final String domain) {
- this.domain = domain;
- return this;
- }
-
- public Builder status(final Status status) {
- this.status = status;
- return this;
- }
-
- public Builder type(final Type type) {
- this.type = type;
- return this;
- }
-
- public Builder location(final String location) {
- this.location = location;
- return this;
- }
-
- public Builder min(final Integer min) {
- this.min = min;
- return this;
- }
-
- public Builder weight(final Integer weight) {
- this.weight = weight;
- return this;
- }
-
- public ProfileDefinitionEndpointParams build() {
- return ProfileDefinitionEndpointParams.create(
- domain,
- status,
- type,
- location,
- min,
- weight);
- }
-
- public Builder fromImageParams(final ProfileDefinitionEndpointParams in) {
- return domain(in.domain())
- .status(in.status())
- .type(in.type())
- .location(in.location())
- .min(in.min())
- .weight(in.weight());
- }
- }
-
- private static ProfileDefinitionEndpointParams create(
- final String domain,
- final Status status,
- final Type type,
- final String location,
- final Integer min,
- final Integer weight) {
- return new AutoValue_ProfileDefinitionEndpointParams(domain, status, type, location, min, weight);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionMonitor.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionMonitor.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionMonitor.java
deleted file mode 100644
index 50dc800..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionMonitor.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import com.google.auto.value.AutoValue;
-import org.jclouds.javax.annotation.Nullable;
-
-/**
- * Azure Traffic Manager endpoint monitor.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/hh758257.aspx">docs</a>
- */
-@AutoValue
-public abstract class ProfileDefinitionMonitor {
-
- public static final int DEFAULT_INTERVAL = 30;
- public static final int DEFAULT_TIMEOUT = 10;
- public static final int DEFAULT_TOLERAION = 3;
- public static final int DEFAULT_EXPECTED = 200;
- public static final String DEFAULT_VERB = "GET";
-
- ProfileDefinitionMonitor() {
- } // For AutoValue only!
-
- /**
- * Specifies the number of seconds between consecutive attempts to check the status of a monitoring endpoint. The
- * value must be set to 30.
- *
- * @return intervall in seconds.
- */
- @Nullable
- public abstract Integer intervall();
-
- /**
- * Specifies the time to wait for response from the monitoring endpoint. The value must be set to 10.
- *
- * @return timeout in seconds.
- */
- @Nullable
- public abstract Integer timeout();
-
- /**
- * Specifies the number of consecutive failures to probe an endpoint before taking the endpoint out of rotation. The
- * value must be set to 3.
- *
- * @return tolerated number of failures.
- */
- @Nullable
- public abstract Integer toleration();
-
- /**
- * Specifies the protocol to use to monitor endpoint health. Possible values are: HTTP, HTTPS.
- *
- * @return endpoint protocol.
- */
- public abstract ProfileDefinition.Protocol protocol();
-
- /**
- * Specifies the port used to monitor endpoint health. Accepted values are integer values greater than 0 and less or
- * equal to 65,535.
- *
- * @return endpoint port.
- */
- public abstract int port();
-
- /**
- * Specifies the verb to use when making an HTTP request to monitor endpoint health. The value must be set to GET.
- *
- * @return verb to use when making an HTTP request.
- */
- @Nullable
- public abstract String verb();
-
- /**
- * Specifies the path relative to the endpoint domain name to probe for health state. Restrictions are: The path must
- * be from 1 through 1000 characters. It must start with a forward slash /. It must contain no brackets <>. It
- * must contain no double slashes //. It must be a well-formed URI string.
- *
- * @return endpoint relative path.
- * @see <a href="https://msdn.microsoft.com/en-us/library/system.uri.iswellformeduristring.aspx">
- * Uri.IsWellFormedUriString Method</a>
- */
- public abstract String path();
-
- /**
- * Specifies the HTTP status code expected from a healthy endpoint. The endpoint is considered unhealthy otherwise.
- * The value must be set to 200.
- *
- * @return expected status code.
- */
- @Nullable
- public abstract Integer expected();
-
- public static ProfileDefinitionMonitor create(
- final Integer intervall,
- final Integer timeout,
- final Integer toleration,
- final ProfileDefinition.Protocol protocol,
- final int port,
- final String verb,
- final String path,
- final Integer expected) {
-
- return new AutoValue_ProfileDefinitionMonitor(
- intervall, timeout, toleration, protocol, port, verb, path, expected);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionParams.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionParams.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionParams.java
deleted file mode 100644
index fdd8b20..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ProfileDefinitionParams.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import com.google.auto.value.AutoValue;
-import java.util.List;
-import org.jclouds.azurecompute.domain.ProfileDefinition.LBMethod;
-import org.jclouds.azurecompute.domain.ProfileDefinition.Protocol;
-
-/**
- * The Create Definition operation creates a new definition for a specified profile. This definition will be assigned a
- * version number by the service. For more information about creating a profile, see Create Profile.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/hh758257.aspx">docs</a>
- */
-@AutoValue
-public abstract class ProfileDefinitionParams {
-
- ProfileDefinitionParams() {
- } // For AutoValue only!
-
- /**
- * Specifies the DNS Time-To-Live (TTL) that informs the Local DNS resolvers how long to cache DNS entries. The value
- * is an integer from 30 through 999,999.
- *
- * @return DNS cache Time-To-Live (TTL)
- */
- public abstract Integer ttl();
-
- /**
- * Specifies the protocol to use to monitor endpoint health. Possible values are: HTTP, HTTPS.
- *
- * @return endpoint protocol.
- */
- public abstract Protocol protocol();
-
- /**
- * Specifies the port used to monitor endpoint health. Accepted values are integer values greater than 0 and less or
- * equal to 65,535.
- *
- * @return endpoint port.
- */
- public abstract Integer port();
-
- /**
- * Specifies the path relative to the endpoint domain name to probe for health state. Restrictions are: The path must
- * be from 1 through 1000 characters. It must start with a forward slash /. It must contain no brackets <>. It
- * must contain no double slashes //. It must be a well-formed URI string.
- *
- * @return endpoint relative path.
- * @see <a href="https://msdn.microsoft.com/en-us/library/system.uri.iswellformeduristring.aspx">
- * Uri.IsWellFormedUriString Method</a>
- */
- public abstract String path();
-
- /**
- * Specifies the load balancing method to use to distribute connection. Possible values are: Performance, Failover,
- * RoundRobin
- *
- * @return load balancing method..
- */
- public abstract LBMethod lb();
-
- /**
- * Encapsulates the list of Azure Traffic Manager endpoints. You can define up to 100 endpoints in the list.
- *
- * @return endpoints.
- * @see ProfileDefinitionEndpointParams
- */
- public abstract List<ProfileDefinitionEndpointParams> endpoints();
-
- public Builder toBuilder() {
- return builder().fromImageParams(this);
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- public static final class Builder {
-
- private Integer ttl;
-
- private Protocol protocol;
-
- private Integer port;
-
- private String path;
-
- private LBMethod lb;
-
- private List<ProfileDefinitionEndpointParams> endpoints;
-
- public Builder ttl(final Integer ttl) {
- this.ttl = ttl;
- return this;
- }
-
- public Builder protocol(final Protocol protocol) {
- this.protocol = protocol;
- return this;
- }
-
- public Builder port(final Integer port) {
- this.port = port;
- return this;
- }
-
- public Builder path(final String path) {
- this.path = path;
- return this;
- }
-
- public Builder lb(final LBMethod lb) {
- this.lb = lb;
- return this;
- }
-
- public Builder endpoints(final List<ProfileDefinitionEndpointParams> endpoints) {
- this.endpoints = endpoints;
- return this;
- }
-
- public ProfileDefinitionParams build() {
- return ProfileDefinitionParams.create(ttl, protocol, port, path, lb, endpoints);
- }
-
- public Builder fromImageParams(final ProfileDefinitionParams in) {
- return ttl(in.ttl())
- .protocol(in.protocol())
- .port(in.port())
- .path(in.path())
- .lb(in.lb())
- .endpoints(in.endpoints());
- }
- }
-
- private static ProfileDefinitionParams create(
- final Integer ttl,
- final Protocol protocol,
- final Integer port,
- final String path,
- final LBMethod lb,
- final List<ProfileDefinitionEndpointParams> endpoints) {
- return new AutoValue_ProfileDefinitionParams(ttl, protocol, port, path, lb, endpoints);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Region.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Region.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Region.java
deleted file mode 100644
index 9ba712d..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/Region.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import java.util.Arrays;
-import java.util.Set;
-
-/**
- * Regions used in Azure.
- *
- * @see <a href="http://azure.microsoft.com/en-us/regions/">this page</a>
- */
-public enum Region {
-
- CENTRAL_US("Central US", "US-IA"),
- EAST_US("East US", "US-VA"),
- EAST_US_2("East US 2", "US-VA"),
- US_GOV_IOWA("US Gov Iowa", "US-IA"),
- US_GOV_VIRGINIA("US Gov Virginia", "US-VA"),
- NORTH_CENTRAL_US("North Central US", "US-IL"),
- SOUTH_CENTRAL_US("South Central US", "US-TX"),
- WEST_US("West US", "US-CA"),
- NORTH_EUROPE("North Europe", "IE"),
- WEST_EUROPE("West Europe", "NL"),
- EAST_ASIA("East Asia", "HK"),
- SOUTH_EAST_ASIA("Southeast Asia", "SG"),
- JAPAN_EAST("Japan East", "JP-11"),
- JAPAN_WEST("Japan West", "JP-27"),
- BRAZIL_SOUTH("Brazil South", "BR"),
- AUSTRALIA_EAST("Australia East", "AU-NSW"),
- AUSTRALIA_SOUTH_EAST("Australia Southeast", "AU-VIC");
-
- private final String name;
-
- private final String iso3166Code;
-
- Region(final String name, final String iso3166Code) {
- this.name = name;
- this.iso3166Code = iso3166Code;
- }
-
- public String getName() {
- return name;
- }
-
- public String iso3166Code() {
- return iso3166Code;
- }
-
- public static Region byName(final String name) {
- Preconditions.checkNotNull(name);
-
- Region result = null;
- for (Region region : values()) {
- if (name.equals(region.name)) {
- result = region;
- }
- }
-
- return result;
- }
-
- public static Set<String> iso3166Codes() {
- return ImmutableSet.copyOf(Iterables.transform(Arrays.asList(values()), new Function<Region, String>() {
-
- @Override
- public String apply(final Region region) {
- return region.iso3166Code;
- }
- }));
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/eb990020/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ReservedIPAddress.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ReservedIPAddress.java b/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ReservedIPAddress.java
deleted file mode 100644
index 83ff644..0000000
--- a/azurecompute/src/main/java/org/jclouds/azurecompute/domain/ReservedIPAddress.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.azurecompute.domain;
-
-import com.google.auto.value.AutoValue;
-import org.jclouds.javax.annotation.Nullable;
-
-/**
- * In most cases, you won’t need to specify a Reserved Private IP address (RPIP) for your virtual machine. VMs in a
- * virtual network will automatically receive a private IP address from a range that you specify. But in certain cases,
- * specifying a reserved private IP address for a particular VM makes sense. For example, a VM may provide DNS services,
- * or act as a domain controller, or any othr critical role that relies on known IP address assignment. Also, if you
- * have a VM that you plan to stop and deprovision at some point, but want retain the RPIP for the VM when you provision
- * it again. An RPIP stays with the VM even through a stop/deprovision state. You can specify an RPIP by using
- * PowerShell at the time you create the VM, or you can update an existing VM.
- *
- * If you have both VMs and PaaS instances in your virtual network, you may want to separate the VMs that have static
- * DIPs from your PaaS instances by creating a separate subnet for the VMs and deploying them to that subnet. It’s not
- * only helpful for you to be able to see your static VMs in a separate subnet and know immediately which have an RPIP,
- * but for this release, it also prevents a new PaaS instance from acquiring the RPIP from a VM that is in the process
- * of being stopped/deprovisioned (not just restarted). This is a current limitation in this release for mixed VM/PaaS
- * subnets and RPIPs. This issue doesn’t happen if you deploy only VMs to the subnet, even if some of the VMs don’t have
- * an RPIP. If you’ve already deployed your VMs, you can easily move them to a new subnet to avoid this potential issue.
- *
- * @see <a href="https://msdn.microsoft.com/en-us/library/dn630228.aspx" >Set a Reserved Private IP Address for a VM</a>
- * @see <a href="https://msdn.microsoft.com/en-us/library/azure/dn722412.aspx" >Get Reserved IP Address</a>
- */
-@AutoValue
-public abstract class ReservedIPAddress {
-
- public static enum State {
-
- CREATED,
- CREATING,
- UPDATING,
- DELETING,
- UNAVAILABLE,
- UNRECOGNIZED;
-
- public static State fromString(final String text) {
- if (text != null) {
- for (State state : State.values()) {
- if (text.equalsIgnoreCase(state.name())) {
- return state;
- }
- }
- }
- return UNRECOGNIZED;
- }
- }
-
- ReservedIPAddress() {
- } // For AutoValue only!
-
- /**
- * Specifies the name that is assigned to the reserved IP address.
- *
- * @return Reserver IP address name..
- */
- public abstract String name();
-
- /**
- * Specifies the IPv4 address that is reserved.
- *
- * @return IPv4 address.
- */
- public abstract String address();
-
- /**
- * Specifies the unique identifier that was generated for the reserved IP address.
- *
- * @return unique identifier.
- */
- public abstract String id();
-
- /**
- * Specifies a label that can be used to identify the reserved IP address. The label can be up to 100 characters long
- * and can be used for your tracking purposes.
- *
- * @return label.
- */
- @Nullable
- public abstract String label();
-
- /**
- * Specifies the state of the reserved IP address.
- *
- * @return state.
- */
- public abstract State state();
-
- /**
- * Indicates whether the reserved IP address is being used.
- *
- * @return <tt>true</tt> if in use; <tt>false</tt> otherwise.
- */
- @Nullable
- public abstract Boolean inUse();
-
- /**
- * Specifies the name of the cloud service that is associated with the reserved IP address.
- *
- * @return associated cloud service name.
- */
- @Nullable
- public abstract String serviceName();
-
- /**
- * Specifies the name of the deployment that is associated with the reserved IP address.
- *
- * @return associated deployment name.
- */
- @Nullable
- public abstract String deploymentName();
-
- /**
- * Specifies the location of the reserved IP address. This is the same location as the associated cloud service.
- *
- * @return location.
- */
- public abstract String location();
-
- public static ReservedIPAddress create(
- final String name,
- final String address,
- final String id,
- final String label,
- final State state,
- final Boolean inUse,
- final String serviceName,
- final String deploymentName,
- final String location
- ) {
-
- return new AutoValue_ReservedIPAddress(
- name, address, id, label, state, inUse, serviceName, deploymentName, location);
- }
-}