mirror of
https://github.com/apache/jclouds.git
synced 2025-02-16 15:08:28 +00:00
Issue 695: Refactored domain package: created packages: virtualmachine,hardware,software,network
This commit is contained in:
parent
e5a845ec9f
commit
5cd43815af
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.hardware;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
@ -16,12 +16,16 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.hardware;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import org.jclouds.javax.annotation.Nullable;
|
import org.jclouds.javax.annotation.Nullable;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.Action;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.Actions;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
|
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.network.Nics;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.network.VirtualNic;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.hardware;
|
||||||
|
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.internal.ResourceCapacity;
|
import org.jclouds.tmrk.enterprisecloud.domain.internal.ResourceCapacity;
|
||||||
|
|
@ -16,9 +16,10 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.hardware;
|
||||||
|
|
||||||
import org.jclouds.javax.annotation.Nullable;
|
import org.jclouds.javax.annotation.Nullable;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.Size;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
|
@ -16,8 +16,9 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.network;
|
||||||
|
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.Actions;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
|
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
@ -47,7 +48,7 @@ public class AssignedIpAddresses extends BaseResource<AssignedIpAddresses> {
|
|||||||
checkNotNull(networks,"networks");
|
checkNotNull(networks,"networks");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AssignedIpAddresses() {
|
public AssignedIpAddresses() {
|
||||||
//For JAXB
|
//For JAXB
|
||||||
}
|
}
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.network;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.network;
|
||||||
|
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
|
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.network;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.network;
|
||||||
|
|
||||||
import org.jclouds.javax.annotation.Nullable;
|
import org.jclouds.javax.annotation.Nullable;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
|
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
|
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.network;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ public class Nics {
|
|||||||
private LinkedHashSet<VirtualNic> nics = Sets.newLinkedHashSet();
|
private LinkedHashSet<VirtualNic> nics = Sets.newLinkedHashSet();
|
||||||
|
|
||||||
@XmlElement(name = "Nic")
|
@XmlElement(name = "Nic")
|
||||||
void setVirtualNic(VirtualNic nic) {
|
public void setVirtualNic(VirtualNic nic) {
|
||||||
this.nics.add(nic);
|
this.nics.add(nic);
|
||||||
}
|
}
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.network;
|
||||||
|
|
||||||
import org.jclouds.javax.annotation.Nullable;
|
import org.jclouds.javax.annotation.Nullable;
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.software;
|
||||||
|
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
|
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
|
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
|
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.software;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlEnum;
|
import javax.xml.bind.annotation.XmlEnum;
|
||||||
import javax.xml.bind.annotation.XmlEnumValue;
|
import javax.xml.bind.annotation.XmlEnumValue;
|
@ -16,11 +16,15 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.vm;
|
||||||
|
|
||||||
import org.jclouds.javax.annotation.Nullable;
|
import org.jclouds.javax.annotation.Nullable;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.*;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.hardware.HardwareConfiguration;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
|
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
|
import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.software.OperatingSystem;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.software.ToolsStatus;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlEnum;
|
import javax.xml.bind.annotation.XmlEnum;
|
@ -16,15 +16,11 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.vm;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import org.jclouds.tmrk.enterprisecloud.domain.network.AssignedIpAddresses;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.LinkedHashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <xs:complexType name="VirtualMachineIpAddresses">
|
* <xs:complexType name="VirtualMachineIpAddresses">
|
@ -16,7 +16,7 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.tmrk.enterprisecloud.domain;
|
package org.jclouds.tmrk.enterprisecloud.domain.vm;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
@ -22,9 +22,9 @@ import com.google.common.util.concurrent.ListenableFuture;
|
|||||||
import org.jclouds.http.filters.BasicAuthentication;
|
import org.jclouds.http.filters.BasicAuthentication;
|
||||||
import org.jclouds.rest.annotations.*;
|
import org.jclouds.rest.annotations.*;
|
||||||
import org.jclouds.rest.functions.ReturnNullOnNotFoundOr404;
|
import org.jclouds.rest.functions.ReturnNullOnNotFoundOr404;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.AssignedIpAddresses;
|
import org.jclouds.tmrk.enterprisecloud.domain.network.AssignedIpAddresses;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.VirtualMachine;
|
import org.jclouds.tmrk.enterprisecloud.domain.vm.VirtualMachine;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.VirtualMachines;
|
import org.jclouds.tmrk.enterprisecloud.domain.vm.VirtualMachines;
|
||||||
|
|
||||||
import javax.ws.rs.Consumes;
|
import javax.ws.rs.Consumes;
|
||||||
import javax.ws.rs.GET;
|
import javax.ws.rs.GET;
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
package org.jclouds.tmrk.enterprisecloud.features;
|
package org.jclouds.tmrk.enterprisecloud.features;
|
||||||
|
|
||||||
import org.jclouds.concurrent.Timeout;
|
import org.jclouds.concurrent.Timeout;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.AssignedIpAddresses;
|
import org.jclouds.tmrk.enterprisecloud.domain.network.AssignedIpAddresses;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.VirtualMachine;
|
import org.jclouds.tmrk.enterprisecloud.domain.vm.VirtualMachine;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.VirtualMachines;
|
import org.jclouds.tmrk.enterprisecloud.domain.vm.VirtualMachines;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
package org.jclouds.tmrk.enterprisecloud.features;
|
package org.jclouds.tmrk.enterprisecloud.features;
|
||||||
|
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.AssignedIpAddresses;
|
import org.jclouds.tmrk.enterprisecloud.domain.network.AssignedIpAddresses;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.DeviceNetwork;
|
import org.jclouds.tmrk.enterprisecloud.domain.network.DeviceNetwork;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.VirtualMachine;
|
import org.jclouds.tmrk.enterprisecloud.domain.vm.VirtualMachine;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.VirtualMachines;
|
import org.jclouds.tmrk.enterprisecloud.domain.vm.VirtualMachines;
|
||||||
import org.testng.annotations.BeforeGroups;
|
import org.testng.annotations.BeforeGroups;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ public class VirtualMachineClientLiveTest extends BaseTerremarkEnterpriseCloudCl
|
|||||||
// TODO: don't hard-code uri
|
// TODO: don't hard-code uri
|
||||||
VirtualMachine virtualMachine = client.getVirtualMachine(new URI("/cloudapi/ecloud/virtualMachines/5504"));
|
VirtualMachine virtualMachine = client.getVirtualMachine(new URI("/cloudapi/ecloud/virtualMachines/5504"));
|
||||||
assert null != virtualMachine;
|
assert null != virtualMachine;
|
||||||
assertEquals(virtualMachine.getStatus(),VirtualMachine.VirtualMachineStatus.DEPLOYED);
|
assertEquals(virtualMachine.getStatus(), VirtualMachine.VirtualMachineStatus.DEPLOYED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -35,8 +35,8 @@ import org.jclouds.rest.AuthorizationException;
|
|||||||
import org.jclouds.rest.BaseRestClientTest;
|
import org.jclouds.rest.BaseRestClientTest;
|
||||||
import org.jclouds.rest.RestContextSpec;
|
import org.jclouds.rest.RestContextSpec;
|
||||||
import org.jclouds.rest.internal.RestAnnotationProcessor;
|
import org.jclouds.rest.internal.RestAnnotationProcessor;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.*;
|
import org.jclouds.tmrk.enterprisecloud.domain.network.AssignedIpAddresses;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.VirtualMachine.VirtualMachineStatus;
|
import org.jclouds.tmrk.enterprisecloud.domain.network.DeviceNetwork;
|
||||||
import org.jclouds.tmrk.enterprisecloud.features.VirtualMachineAsyncClient;
|
import org.jclouds.tmrk.enterprisecloud.features.VirtualMachineAsyncClient;
|
||||||
import org.testng.Assert;
|
import org.testng.Assert;
|
||||||
import org.testng.annotations.BeforeClass;
|
import org.testng.annotations.BeforeClass;
|
||||||
|
@ -36,7 +36,18 @@ import org.jclouds.rest.BaseRestClientTest;
|
|||||||
import org.jclouds.rest.RestContextSpec;
|
import org.jclouds.rest.RestContextSpec;
|
||||||
import org.jclouds.rest.internal.RestAnnotationProcessor;
|
import org.jclouds.rest.internal.RestAnnotationProcessor;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.*;
|
import org.jclouds.tmrk.enterprisecloud.domain.*;
|
||||||
import org.jclouds.tmrk.enterprisecloud.domain.VirtualMachine.VirtualMachineStatus;
|
import org.jclouds.tmrk.enterprisecloud.domain.hardware.HardwareConfiguration;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.hardware.Memory;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.hardware.VirtualDisk;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.network.AssignedIpAddresses;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.network.DeviceNetwork;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.network.NetworkReference;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.network.VirtualNic;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.software.OperatingSystem;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.software.ToolsStatus;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.vm.VirtualMachine.VirtualMachineStatus;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.vm.VirtualMachine;
|
||||||
|
import org.jclouds.tmrk.enterprisecloud.domain.vm.VirtualMachineIpAddresses;
|
||||||
import org.jclouds.tmrk.enterprisecloud.features.VirtualMachineAsyncClient;
|
import org.jclouds.tmrk.enterprisecloud.features.VirtualMachineAsyncClient;
|
||||||
import org.testng.Assert;
|
import org.testng.Assert;
|
||||||
import org.testng.annotations.BeforeClass;
|
import org.testng.annotations.BeforeClass;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user