You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ad...@apache.org on 2014/11/17 17:21:23 UTC

[16/32] jclouds-labs git commit: JCLOUDS-780 Remove vcloud-director.

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VmApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VmApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VmApi.java
deleted file mode 100644
index 4ae534b..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/VmApi.java
+++ /dev/null
@@ -1,404 +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.vcloud.director.v1_5.features;
-
-import static org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.ANY_IMAGE;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.DEPLOY_VAPP_PARAMS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.GUEST_CUSTOMIZATION_SECTION;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.MEDIA_PARAMS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.NETWORK_CONNECTION_SECTION;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.OPERATING_SYSTEM_SECTION;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.OVF_RASD_ITEM;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.OVF_RASD_ITEMS_LIST;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.PRODUCT_SECTION_LIST;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.RELOCATE_VM_PARAMS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.TASK;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.UNDEPLOY_VAPP_PARAMS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.VIRTUAL_HARDWARE_SECTION;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.VM;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.VM_PENDING_ANSWER;
-
-import java.net.URI;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.rest.annotations.BinderParam;
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.JAXBResponseParser;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.binders.BindToXMLPayload;
-import org.jclouds.vcloud.director.v1_5.domain.ProductSectionList;
-import org.jclouds.vcloud.director.v1_5.domain.RasdItemsList;
-import org.jclouds.vcloud.director.v1_5.domain.ScreenTicket;
-import org.jclouds.vcloud.director.v1_5.domain.Task;
-import org.jclouds.vcloud.director.v1_5.domain.Vm;
-import org.jclouds.vcloud.director.v1_5.domain.VmPendingQuestion;
-import org.jclouds.vcloud.director.v1_5.domain.VmQuestionAnswer;
-import org.jclouds.vcloud.director.v1_5.domain.dmtf.RasdItem;
-import org.jclouds.vcloud.director.v1_5.domain.params.DeployVAppParams;
-import org.jclouds.vcloud.director.v1_5.domain.params.MediaInsertOrEjectParams;
-import org.jclouds.vcloud.director.v1_5.domain.params.RelocateParams;
-import org.jclouds.vcloud.director.v1_5.domain.params.UndeployVAppParams;
-import org.jclouds.vcloud.director.v1_5.domain.section.GuestCustomizationSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConnectionSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.RuntimeInfoSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.VirtualHardwareSection;
-import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-import org.jclouds.vcloud.director.v1_5.functions.ReturnPayloadBytes;
-
-@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
-public interface VmApi {
-
-   /** Returns the virtual machine or null if not found. */
-   @GET
-   @Consumes(VM)
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   @Nullable
-   Vm get(@EndpointParam URI vmHref);
-
-   /** Modifies the name/description of a {@link Vm}. */
-   @PUT
-   @Produces(VM)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task edit(@EndpointParam URI vmHref, @BinderParam(BindToXMLPayload.class) Vm vApp);
-
-   @DELETE
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task remove(@EndpointParam URI vmHref);
-
-   @POST
-   @Path("/action/consolidate")
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task consolidate(@EndpointParam URI vmHref);
-
-   @POST
-   @Path("/action/deploy")
-   @Produces(DEPLOY_VAPP_PARAMS)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task deploy(@EndpointParam URI vmHref, @BinderParam(BindToXMLPayload.class) DeployVAppParams params);
-
-   @POST
-   @Path("/action/discardSuspendedState")
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task discardSuspendedState(@EndpointParam URI vmHref);
-
-   /**
-    * Installs VMware tools to the virtual machine.
-    * 
-    * <p />It should be running in order for them to be installed.
-    */
-   @POST
-   @Path("/action/installVMwareTools")
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task installVMwareTools(@EndpointParam URI vmHref);
-
-   @POST
-   @Path("/action/relocate")
-   @Produces(RELOCATE_VM_PARAMS)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task relocate(@EndpointParam URI vmHref, @BinderParam(BindToXMLPayload.class) RelocateParams params);
-
-   @POST
-   @Path("/action/undeploy")
-   @Produces(UNDEPLOY_VAPP_PARAMS)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task undeploy(@EndpointParam URI vmHref,
-         @BinderParam(BindToXMLPayload.class) UndeployVAppParams params);
-
-   /**
-    * Upgrade virtual hardware version of a VM to the highest supported virtual hardware version of
-    * provider vDC where the VM locates.
-    */
-   @POST
-   @Path("/action/upgradeHardwareVersion")
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task upgradeHardwareVersion(@EndpointParam URI vmHref);
-
-   @POST
-   @Path("/power/action/powerOff")
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task powerOff(@EndpointParam URI vmHref);
-
-   @POST
-   @Path("/power/action/powerOn")
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task powerOn(@EndpointParam URI vmHref);
-
-   @POST
-   @Path("/power/action/reboot")
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task reboot(@EndpointParam URI vmHref);
-
-   @POST
-   @Path("/power/action/reset")
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task reset(@EndpointParam URI vmHref);
-
-   @POST
-   @Path("/power/action/shutdown")
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task shutdown(@EndpointParam URI vmHref);
-
-   @POST
-   @Path("/power/action/suspend")
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task suspend(@EndpointParam URI vmHref);
-
-   @GET
-   @Path("/guestCustomizationSection")
-   @Consumes
-   @JAXBResponseParser
-   GuestCustomizationSection getGuestCustomizationSection(@EndpointParam URI vmHref);
-
-   @PUT
-   @Path("/guestCustomizationSection")
-   @Produces(GUEST_CUSTOMIZATION_SECTION)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task editGuestCustomizationSection(@EndpointParam URI vmHref,
-         @BinderParam(BindToXMLPayload.class) GuestCustomizationSection section);
-
-   @POST
-   @Path("/media/action/ejectMedia")
-   @Produces(MEDIA_PARAMS)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task ejectMedia(@EndpointParam URI vmHref,
-         @BinderParam(BindToXMLPayload.class) MediaInsertOrEjectParams mediaParams);
-
-   @POST
-   @Path("/media/action/insertMedia")
-   @Produces(MEDIA_PARAMS)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task insertMedia(@EndpointParam URI vmHref,
-         @BinderParam(BindToXMLPayload.class) MediaInsertOrEjectParams mediaParams);
-
-   @GET
-   @Path("/networkConnectionSection")
-   @Consumes
-   @JAXBResponseParser
-   NetworkConnectionSection getNetworkConnectionSection(@EndpointParam URI vmHref);
-
-   @PUT
-   @Path("/networkConnectionSection")
-   @Produces(NETWORK_CONNECTION_SECTION)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task editNetworkConnectionSection(@EndpointParam URI vmHref,
-         @BinderParam(BindToXMLPayload.class) NetworkConnectionSection section);
-
-   @GET
-   @Path("/operatingSystemSection")
-   @Consumes
-   @JAXBResponseParser
-   OperatingSystemSection getOperatingSystemSection(@EndpointParam URI vmHref);
-
-   @PUT
-   @Path("/operatingSystemSection")
-   @Produces(OPERATING_SYSTEM_SECTION)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task editOperatingSystemSection(@EndpointParam URI vmHref,
-         @BinderParam(BindToXMLPayload.class) OperatingSystemSection section);
-
-   @GET
-   @Path("/productSections")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   ProductSectionList getProductSections(@EndpointParam URI vmHref);
-
-   @PUT
-   @Path("/productSections")
-   @Produces(PRODUCT_SECTION_LIST)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task editProductSections(@EndpointParam URI vmHref,
-         @BinderParam(BindToXMLPayload.class) ProductSectionList sectionList);
-
-   /**
-    * Retrieves a pending question for a {@link Vm}.
-    * 
-    * <p/> The user should answer to the question by operation
-    * {@link #answerQuestion(URI, VmQuestionAnswer)}. Usually questions will be asked when the VM
-    * is powering on.
-    */
-   @GET
-   @Path("/question")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   VmPendingQuestion getPendingQuestion(@EndpointParam URI vmHref);
-
-   /**
-    * Answer a pending question on a {@link Vm}.
-    * 
-    * The answer IDs of choice and question should match the ones returned from operation
-    * {@link #getPendingQuestion(URI)}.
-    */
-   @POST
-   @Path("/question/action/answer")
-   @Produces(VM_PENDING_ANSWER)
-   @Consumes
-   @JAXBResponseParser
-   void answerQuestion(@EndpointParam URI vmHref, @BinderParam(BindToXMLPayload.class) VmQuestionAnswer answer);
-
-   @GET
-   @Path("/runtimeInfoSection")
-   @Consumes
-   @JAXBResponseParser
-   RuntimeInfoSection getRuntimeInfoSection(@EndpointParam URI vmHref);
-
-   @GET
-   @Path("/screen")
-   @Consumes(ANY_IMAGE)
-   @ResponseParser(ReturnPayloadBytes.class)
-   byte[] getScreenImage(@EndpointParam URI vmHref);
-
-   @POST
-   @Path("/screen/action/acquireTicket")
-   @Consumes
-   @JAXBResponseParser
-   ScreenTicket getScreenTicket(@EndpointParam URI vmHref);
-
-   @GET
-   @Path("/virtualHardwareSection")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   VirtualHardwareSection getVirtualHardwareSection(@EndpointParam URI vmHref);
-
-   @PUT
-   @Path("/virtualHardwareSection")
-   @Produces(VIRTUAL_HARDWARE_SECTION)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task editVirtualHardwareSection(@EndpointParam URI vmHref,
-         @BinderParam(BindToXMLPayload.class) VirtualHardwareSection section);
-
-   @GET
-   @Path("/virtualHardwareSection/cpu")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   RasdItem getVirtualHardwareSectionCpu(@EndpointParam URI vmHref);
-
-   @PUT
-   @Path("/virtualHardwareSection/cpu")
-   @Produces(OVF_RASD_ITEM)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task editVirtualHardwareSectionCpu(@EndpointParam URI vmHref,
-         @BinderParam(BindToXMLPayload.class) RasdItem rasd);
-
-   @GET
-   @Path("/virtualHardwareSection/disks")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   RasdItemsList getVirtualHardwareSectionDisks(@EndpointParam URI vmHref);
-
-   @PUT
-   @Path("/virtualHardwareSection/disks")
-   @Produces(OVF_RASD_ITEMS_LIST)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task editVirtualHardwareSectionDisks(@EndpointParam URI vmHref,
-         @BinderParam(BindToXMLPayload.class) RasdItemsList rasdItemsList);
-
-   /**
-    * Retrieves the list of items that represents the floppies and CD/DVD drives in a {@link Vm}.
-    */
-   @GET
-   @Path("/virtualHardwareSection/media")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   RasdItemsList getVirtualHardwareSectionMedia(@EndpointParam URI vmHref);
-
-   @GET
-   @Path("/virtualHardwareSection/memory")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   RasdItem getVirtualHardwareSectionMemory(@EndpointParam URI vmHref);
-
-   @PUT
-   @Path("/virtualHardwareSection/memory")
-   @Produces(OVF_RASD_ITEM)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task editVirtualHardwareSectionMemory(@EndpointParam URI vmHref,
-         @BinderParam(BindToXMLPayload.class) RasdItem rasd);
-
-   @GET
-   @Path("/virtualHardwareSection/networkCards")
-   @Consumes
-   @JAXBResponseParser
-   RasdItemsList getVirtualHardwareSectionNetworkCards(@EndpointParam URI vmHref);
-
-   @PUT
-   @Path("/virtualHardwareSection/networkCards")
-   @Produces(OVF_RASD_ITEMS_LIST)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task editVirtualHardwareSectionNetworkCards(@EndpointParam URI vmHref,
-         @BinderParam(BindToXMLPayload.class) RasdItemsList rasdItemsList);
-
-   @GET
-   @Path("/virtualHardwareSection/serialPorts")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   RasdItemsList getVirtualHardwareSectionSerialPorts(@EndpointParam URI vmHref);
-
-   @PUT
-   @Path("/virtualHardwareSection/serialPorts")
-   @Produces(OVF_RASD_ITEMS_LIST)
-   @Consumes(TASK)
-   @JAXBResponseParser
-   Task editVirtualHardwareSectionSerialPorts(@EndpointParam URI vmHref,
-         @BinderParam(BindToXMLPayload.class) RasdItemsList rasdItemsList);
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogApi.java
deleted file mode 100644
index 567cfcb..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminCatalogApi.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.vcloud.director.v1_5.features.admin;
-
-import static org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.ADMIN_CATALOG;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.CONTROL_ACCESS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.OWNER;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.PUBLISH_CATALOG_PARAMS;
-
-import java.net.URI;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.rest.annotations.BinderParam;
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.JAXBResponseParser;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.binders.BindToXMLPayload;
-import org.jclouds.vcloud.director.v1_5.domain.AdminCatalog;
-import org.jclouds.vcloud.director.v1_5.domain.Owner;
-import org.jclouds.vcloud.director.v1_5.domain.params.ControlAccessParams;
-import org.jclouds.vcloud.director.v1_5.domain.params.PublishCatalogParams;
-import org.jclouds.vcloud.director.v1_5.features.CatalogApi;
-import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-
-@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
-public interface AdminCatalogApi extends CatalogApi {
-
-   @Override
-   @GET
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   @Nullable
-   AdminCatalog get(@EndpointParam URI orgHref);
-
-   /**
-    * Creates a catalog in an organization. The catalog will always be added in unpublished state.
-    */
-   @POST
-   @Path("/catalogs")
-   @Consumes(ADMIN_CATALOG)
-   @Produces(ADMIN_CATALOG)
-   @JAXBResponseParser
-   AdminCatalog addCatalogToOrg(@BinderParam(BindToXMLPayload.class) AdminCatalog catalog,
-         @EndpointParam URI orgHref);
-
-   /**
-    * Modifies a catalog. A catalog could be published or unpublished. The IsPublished property is
-    * treated as a read only value by the server. In order to control publishing settings use the
-    * 'publish' action must be used.
-    */
-   @PUT
-   @Consumes(ADMIN_CATALOG)
-   @Produces(ADMIN_CATALOG)
-   @JAXBResponseParser
-   AdminCatalog edit(@EndpointParam URI catalogAdminHref,
-         @BinderParam(BindToXMLPayload.class) AdminCatalog catalog);
-
-   /**
-    * Deletes a catalog. The catalog could be removed if it is either published or unpublished.
-    */
-   @DELETE
-   @Consumes
-   @JAXBResponseParser
-   void remove(@EndpointParam URI catalogAdminHref);
-
-   @GET
-   @Path("/owner")
-   @Consumes
-   @JAXBResponseParser
-   Owner getOwner(@EndpointParam URI catalogAdminHref);
-
-   @PUT
-   @Path("/owner")
-   @Consumes
-   @Produces(OWNER)
-   @JAXBResponseParser
-   void setOwner(@EndpointParam URI catalogAdminHref, @BinderParam(BindToXMLPayload.class) Owner newOwner);
-   
-   /**
-    * Publish a catalog. Publishing a catalog makes the catalog visible to all organizations in a
-    * vCloud.
-    */
-   @POST
-   @Path("/action/publish")
-   @Consumes
-   @Produces(PUBLISH_CATALOG_PARAMS)
-   @JAXBResponseParser
-   void publish(@EndpointParam URI catalogAdminHref, @BinderParam(BindToXMLPayload.class) PublishCatalogParams params);
-
-   @POST
-   @Path("/action/controlAccess")
-   @Produces(CONTROL_ACCESS)
-   @Consumes(CONTROL_ACCESS)
-   @JAXBResponseParser
-   ControlAccessParams editAccessControl(@EndpointParam URI catalogAdminHref,
-         @BinderParam(BindToXMLPayload.class) ControlAccessParams params);
-
-   @GET
-   @Path("/controlAccess")
-   @Consumes
-   @JAXBResponseParser
-   ControlAccessParams getAccessControl(@EndpointParam URI catalogAdminHref);
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkApi.java
deleted file mode 100644
index 7e50534..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminNetworkApi.java
+++ /dev/null
@@ -1,76 +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.vcloud.director.v1_5.features.admin;
-
-import static org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.ADMIN_ORG_NETWORK;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.TASK;
-
-import java.net.URI;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-
-import org.jclouds.rest.annotations.BinderParam;
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.JAXBResponseParser;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.binders.BindToXMLPayload;
-import org.jclouds.vcloud.director.v1_5.domain.Task;
-import org.jclouds.vcloud.director.v1_5.domain.network.Network;
-import org.jclouds.vcloud.director.v1_5.domain.org.OrgNetwork;
-import org.jclouds.vcloud.director.v1_5.features.NetworkApi;
-import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-
-@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
-public interface AdminNetworkApi extends NetworkApi {
-
-   /**
-    * Gets admin representation of the network or null if not found.
-    *
-    * <p />This operation could return admin representation of
-    * organization network or external network. vApp networks do not have admin representation.
-    */
-   @Override
-   @GET
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   Network get(@EndpointParam URI networkAdminHref);
-
-   @PUT
-   @Consumes(TASK)
-   @Produces(ADMIN_ORG_NETWORK)
-   @JAXBResponseParser
-   Task edit(@EndpointParam URI networkAdminHref, @BinderParam(BindToXMLPayload.class) OrgNetwork network);
-
-   /**
-    * Reset(undeploy & redeploy) networking services on a logical network. The reset operation can
-    * be performed on: - external networks - organization networks - vApp networks The reset
-    * operation can be performed only on deployed networks.
-    */
-   @POST
-   @Path("/action/reset")
-   @Consumes
-   @JAXBResponseParser
-   Task reset(@EndpointParam URI networkAdminHref);
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgApi.java
deleted file mode 100644
index 555c46c..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminOrgApi.java
+++ /dev/null
@@ -1,159 +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.vcloud.director.v1_5.features.admin;
-
-import static org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.ORG_EMAIL_SETTINGS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.ORG_GENERAL_SETTINGS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.ORG_LEASE_SETTINGS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.ORG_PASSWORD_POLICY_SETTINGS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.ORG_SETTINGS;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.ORG_VAPP_TEMPLATE_LEASE_SETTINGS;
-
-import java.net.URI;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-
-import org.jclouds.rest.annotations.BinderParam;
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.JAXBResponseParser;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.binders.BindToXMLPayload;
-import org.jclouds.vcloud.director.v1_5.domain.org.AdminOrg;
-import org.jclouds.vcloud.director.v1_5.domain.org.OrgEmailSettings;
-import org.jclouds.vcloud.director.v1_5.domain.org.OrgGeneralSettings;
-import org.jclouds.vcloud.director.v1_5.domain.org.OrgLdapSettings;
-import org.jclouds.vcloud.director.v1_5.domain.org.OrgLeaseSettings;
-import org.jclouds.vcloud.director.v1_5.domain.org.OrgPasswordPolicySettings;
-import org.jclouds.vcloud.director.v1_5.domain.org.OrgSettings;
-import org.jclouds.vcloud.director.v1_5.domain.org.OrgVAppTemplateLeaseSettings;
-import org.jclouds.vcloud.director.v1_5.features.OrgApi;
-import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-
-@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
-public interface AdminOrgApi extends OrgApi {
-
-   /** Retrieves an admin view of an organization or null if not found. */
-   @Override
-   @GET
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   AdminOrg get(@EndpointParam URI adminOrgHref);
-
-   @GET
-   @Path("/settings")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   OrgSettings getSettings(@EndpointParam URI adminOrgHref);
-
-   @PUT
-   @Path("/settings")
-   @Consumes(ORG_SETTINGS)
-   @Produces(ORG_SETTINGS)
-   @JAXBResponseParser
-   OrgSettings editSettings(@EndpointParam URI adminOrgHref,
-         @BinderParam(BindToXMLPayload.class) OrgSettings settings);
-
-   @GET
-   @Path("/settings/email")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   OrgEmailSettings getEmailSettings(@EndpointParam URI adminOrgHref);
-
-   @PUT
-   @Path("/settings/email")
-   @Consumes(ORG_EMAIL_SETTINGS)
-   @Produces(ORG_EMAIL_SETTINGS)
-   @JAXBResponseParser
-   OrgEmailSettings editEmailSettings(@EndpointParam URI adminOrgHref,
-         @BinderParam(BindToXMLPayload.class) OrgEmailSettings settings);
-
-   @GET
-   @Path("/settings/general")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   OrgGeneralSettings getGeneralSettings(@EndpointParam URI adminOrgHref);
-
-   @PUT
-   @Path("/settings/general")
-   @Consumes(ORG_GENERAL_SETTINGS)
-   @Produces(ORG_GENERAL_SETTINGS)
-   @JAXBResponseParser
-   OrgGeneralSettings editGeneralSettings(@EndpointParam URI adminOrgHref,
-         @BinderParam(BindToXMLPayload.class) OrgGeneralSettings settings);
-
-   @GET
-   @Path("/settings/ldap")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   OrgLdapSettings getLdapSettings(@EndpointParam URI adminOrgHref);
-
-   @GET
-   @Path("/settings/passwordPolicy")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   OrgPasswordPolicySettings getPasswordPolicy(@EndpointParam URI adminOrgHref);
-
-   @PUT
-   @Path("/settings/passwordPolicy")
-   @Consumes(ORG_PASSWORD_POLICY_SETTINGS)
-   @Produces(ORG_PASSWORD_POLICY_SETTINGS)
-   @JAXBResponseParser
-   OrgPasswordPolicySettings editPasswordPolicy(@EndpointParam URI adminOrgHref,
-         @BinderParam(BindToXMLPayload.class) OrgPasswordPolicySettings settings);
-
-   @GET
-   @Path("/settings/vAppLeaseSettings")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   OrgLeaseSettings getVAppLeaseSettings(@EndpointParam URI adminOrgHref);
-
-   @PUT
-   @Path("/settings/vAppLeaseSettings")
-   @Consumes(ORG_LEASE_SETTINGS)
-   @Produces(ORG_LEASE_SETTINGS)
-   @JAXBResponseParser
-   OrgLeaseSettings editVAppLeaseSettings(@EndpointParam URI adminOrgHref,
-         @BinderParam(BindToXMLPayload.class) OrgLeaseSettings settings);
-
-   @GET
-   @Path("/settings/vAppTemplateLeaseSettings")
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   OrgVAppTemplateLeaseSettings getVAppTemplateLeaseSettings(@EndpointParam URI adminOrgHref);
-
-   @PUT
-   @Path("/settings/vAppTemplateLeaseSettings")
-   @Consumes(ORG_VAPP_TEMPLATE_LEASE_SETTINGS)
-   @Produces(ORG_VAPP_TEMPLATE_LEASE_SETTINGS)
-   @JAXBResponseParser
-   OrgVAppTemplateLeaseSettings editVAppTemplateLeaseSettings(@EndpointParam URI adminOrgHref,
-         @BinderParam(BindToXMLPayload.class) OrgVAppTemplateLeaseSettings settings);
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryApi.java
deleted file mode 100644
index e25f8be..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminQueryApi.java
+++ /dev/null
@@ -1,143 +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.vcloud.director.v1_5.features.admin;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-
-import org.jclouds.rest.annotations.JAXBResponseParser;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.vcloud.director.v1_5.domain.RoleReferences;
-import org.jclouds.vcloud.director.v1_5.domain.query.QueryResultRecords;
-import org.jclouds.vcloud.director.v1_5.features.QueryApi;
-import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-
-@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
-public interface AdminQueryApi extends QueryApi {
-
-   /**
-    * Retrieves a list of {@link Group}s for organization the org admin belongs to by using REST API general
-    * QueryHandler
-    *
-    * <pre>
-    * GET /admin/groups/query
-    * </pre>
-    */
-   @GET
-   @Path("/admin/groups/query")
-   @Consumes
-   @JAXBResponseParser
-   QueryResultRecords groupsQueryAll();
-
-   /**
-    * Retrieves a list of {@link Org}s by using REST API general QueryHandler.
-    *
-    * <pre>
-    * GET /admin/orgs/query
-    * </pre>
-    */
-   @GET
-   @Path("/admin/orgs/query")
-   @Consumes
-   @JAXBResponseParser
-   QueryResultRecords orgsQueryAll();
-
-   /**
-    * Retrieves a list of {@link Right}s by using REST API general QueryHandler.
-    *
-    * <pre>
-    * GET /admin/rights/query
-    * </pre>
-    */
-   @GET
-   @Path("/admin/rights/query")
-   @Consumes
-   @JAXBResponseParser
-   QueryResultRecords rightsQueryAll();
-
-   /**
-    * Retrieves a list of {@link Role}s by using REST API general QueryHandler.
-    *
-    * <pre>
-    * GET /admin/roles/query
-    * </pre>
-    */
-   @GET
-   @Path("/admin/roles/query")
-   @Consumes
-   @JAXBResponseParser
-   QueryResultRecords rolesQueryAll();
-
-   /**
-    * Retrieves a list of {@link RoleReference}s by using REST API general QueryHandler.
-    *
-    * <pre>
-    * GET /admin/roles/query?format=references
-    * </pre>
-    */
-   @GET
-   @Path("/admin/roles/query")
-   @Consumes
-   @QueryParams(keys = { "format" }, values = { "references" })
-   @JAXBResponseParser
-   RoleReferences roleReferencesQueryAll();
-
-   /**
-    * Retrieves a list of {@link User}s by using REST API general QueryHandler.
-    *
-    * <pre>
-    * GET /admin/strandedUsers/query
-    * </pre>
-    */
-   @GET
-   @Path("/admin/strandedUsers/query")
-   @Consumes
-   @JAXBResponseParser
-   QueryResultRecords strandedUsersQueryAll();
-
-   /**
-    * Retrieves a list of {@link User}s by using REST API general QueryHandler.
-    *
-    * <pre>
-    * GET /admin/users/query
-    * </pre>
-    *
-    * @see #queryAll(String)
-    */
-   @GET
-   @Path("/admin/users/query")
-   @Consumes
-   @JAXBResponseParser
-   QueryResultRecords usersQueryAll();
-
-   /**
-    * Retrieves a list of {@link Vdc}s by using REST API general QueryHandler.
-    *
-    * <pre>
-    * GET /admin/vdcs/query
-    * </pre>
-    *
-    * @see #queryAll(String)
-    */
-   @GET
-   @Path("/admin/vdcs/query")
-   @Consumes
-   @JAXBResponseParser
-   QueryResultRecords vdcsQueryAll();
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcApi.java
deleted file mode 100644
index dcd6fba..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/AdminVdcApi.java
+++ /dev/null
@@ -1,92 +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.vcloud.director.v1_5.features.admin;
-
-import static org.jclouds.Fallbacks.NullOnNotFoundOr404;
-
-import java.net.URI;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.JAXBResponseParser;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
-import org.jclouds.vcloud.director.v1_5.domain.AdminVdc;
-import org.jclouds.vcloud.director.v1_5.domain.Task;
-import org.jclouds.vcloud.director.v1_5.features.VdcApi;
-import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-
-@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
-public interface AdminVdcApi extends VdcApi {
-
-   /** Returns an admin view of the virtual datacenter or null if not found. */
-   @Override
-   @GET
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   AdminVdc get(@EndpointParam URI vdcAdminHref);
-
-   /**
-    * Modifies a Virtual Data Center. Virtual Data Center could be enabled or disabled. 
-    * Additionally it could have one of these states FAILED_CREATION(-1), NOT_READY(0), 
-    * READY(1), UNKNOWN(1) and UNRECOGNIZED(3).
-    */
-   @PUT
-   @Consumes
-   @Produces(VCloudDirectorMediaType.ADMIN_VDC)
-   @JAXBResponseParser
-   Task edit(@EndpointParam URI vdcAdminHref, AdminVdc vdc);
-
-   /**
-    * Deletes a Virtual Data Center. The Virtual Data Center should be disabled when remove is issued. 
-    * Otherwise error code 400 Bad Request is returned.
-    */
-   // TODO Saw what exception, instead of 400 
-   @DELETE
-   @Consumes
-   @JAXBResponseParser
-   Task remove(@EndpointParam URI vdcAdminHref);
-
-   /**
-    * Enables a Virtual Data Center. This operation enables disabled Virtual Data Center. 
-    * If it is already enabled this operation has no effect.
-    */
-   @POST
-   @Consumes
-   @Path("/action/enable")
-   @JAXBResponseParser
-   void enable(@EndpointParam URI vdcAdminHref);
-
-   /**
-    * Disables a Virtual Data Center. If the Virtual Data Center is disabled this operation does not 
-    * have an effect.
-    */
-   @POST
-   @Consumes
-   @Path("/action/disable")
-   @JAXBResponseParser
-   void disable(@EndpointParam URI vdcAdminHref);
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/GroupApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/GroupApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/GroupApi.java
deleted file mode 100644
index 77fdae5..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/GroupApi.java
+++ /dev/null
@@ -1,69 +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.vcloud.director.v1_5.features.admin;
-
-import static org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.GROUP;
-
-import java.net.URI;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.rest.annotations.BinderParam;
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.JAXBResponseParser;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.binders.BindToXMLPayload;
-import org.jclouds.vcloud.director.v1_5.domain.Group;
-import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-
-@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
-public interface GroupApi {
-   /** Returns the group or null if not found. */
-   @GET
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   @Nullable
-   Group get(@EndpointParam URI groupUri);
-
-   @POST
-   @Path("/groups")
-   @Consumes(GROUP)
-   @Produces(GROUP)
-   @JAXBResponseParser
-   Group addGroupToOrg(@BinderParam(BindToXMLPayload.class) Group group, @EndpointParam URI adminUrn);
-
-   @PUT
-   @Consumes(GROUP)
-   @Produces(GROUP)
-   @JAXBResponseParser
-   Group edit(@EndpointParam URI groupUrn, @BinderParam(BindToXMLPayload.class) Group group);
-
-   @DELETE
-   @Consumes
-   @JAXBResponseParser
-   void remove(@EndpointParam URI groupUrn);
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/UserApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/UserApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/UserApi.java
deleted file mode 100644
index cf94dea..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/features/admin/UserApi.java
+++ /dev/null
@@ -1,84 +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.vcloud.director.v1_5.features.admin;
-
-import static org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType.USER;
-
-import java.net.URI;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.rest.annotations.BinderParam;
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.JAXBResponseParser;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.binders.BindToXMLPayload;
-import org.jclouds.vcloud.director.v1_5.domain.User;
-import org.jclouds.vcloud.director.v1_5.filters.AddVCloudAuthorizationAndCookieToRequest;
-
-@RequestFilters(AddVCloudAuthorizationAndCookieToRequest.class)
-public interface UserApi {
-
-   /** Returns the user, even if disabled, or null if not found. */
-   @GET
-   @Consumes
-   @JAXBResponseParser
-   @Fallback(NullOnNotFoundOr404.class)
-   @Nullable
-   User get(@EndpointParam URI userHref);
-
-   /**
-    * Creates or imports a user in an organization. The user could be enabled or disabled.
-    */
-   @POST
-   @Path("/users")
-   @Consumes(USER)
-   @Produces(USER)
-   @JAXBResponseParser
-   User addUserToOrg(@BinderParam(BindToXMLPayload.class) User user, @EndpointParam URI orgAdminHref);
-
-
-   /**
-    * Modifies a user. The user object could be enabled or disabled. Note: the lock status cannot be
-    * changed using this call: use {@link #unlock(URI)}.
-    */
-   @PUT
-   @Consumes(USER)
-   @Produces(USER)
-   @JAXBResponseParser
-   User edit(@EndpointParam URI userHref, @BinderParam(BindToXMLPayload.class) User user);
-
-   @DELETE
-   @Consumes
-   @JAXBResponseParser
-   void remove(@EndpointParam URI userHref);
-
-   @POST
-   @Path("/action/unlock")
-   @Consumes
-   @JAXBResponseParser
-   void unlock(@EndpointParam URI userHref);
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/filters/AddVCloudAuthorizationAndCookieToRequest.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/filters/AddVCloudAuthorizationAndCookieToRequest.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/filters/AddVCloudAuthorizationAndCookieToRequest.java
deleted file mode 100644
index 50a8a96..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/filters/AddVCloudAuthorizationAndCookieToRequest.java
+++ /dev/null
@@ -1,51 +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.vcloud.director.v1_5.filters;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.http.HttpException;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpRequestFilter;
-import org.jclouds.vcloud.director.v1_5.annotations.Session;
-
-import com.google.common.base.Supplier;
-import com.google.common.collect.ImmutableMultimap;
-import com.google.common.net.HttpHeaders;
-
-@Singleton
-public class AddVCloudAuthorizationAndCookieToRequest implements HttpRequestFilter {
-
-   private final Supplier<String> sessionSupplier;
-
-   @Inject
-   public AddVCloudAuthorizationAndCookieToRequest(@Session Supplier<String> sessionSupplier) {
-      this.sessionSupplier = sessionSupplier;
-   }
-
-   @Override
-   public HttpRequest filter(HttpRequest request) throws HttpException {
-      String token = sessionSupplier.get();
-      return request
-               .toBuilder()
-               .replaceHeaders(
-                        ImmutableMultimap.of("x-vcloud-authorization", token, HttpHeaders.COOKIE, "vcloud-token="
-                                 + token)).build();
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/IdToAdminHref.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/IdToAdminHref.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/IdToAdminHref.java
deleted file mode 100644
index 8b969ac..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/IdToAdminHref.java
+++ /dev/null
@@ -1,63 +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.vcloud.director.v1_5.functions;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.net.URI;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.vcloud.director.v1_5.domain.Entity;
-import org.jclouds.vcloud.director.v1_5.domain.Link;
-
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
-import com.google.common.cache.LoadingCache;
-import com.google.common.collect.Iterables;
-
-/**
- * Resolves URN to its Admin HREF via the entity Resolver
- */
-@Singleton
-public final class IdToAdminHref implements Function<String, URI> {
-   private final LoadingCache<String, Entity> resolveEntityCache;
-
-   @Inject
-   public IdToAdminHref(LoadingCache<String, Entity> resolveEntityCache) {
-      this.resolveEntityCache = checkNotNull(resolveEntityCache, "resolveEntityCache");
-   }
-
-   @Override
-   public URI apply(String from) {
-      checkNotNull(from, "urn");
-      Entity entity = resolveEntityCache.getUnchecked(from.toString());
-      Optional<Link> link = Iterables.tryFind(entity.getLinks(), typeContainsAdmin);
-      checkArgument(link.isPresent(), "no admin link found for entity %s", entity);
-      return link.get().getHref();
-   }
-
-   private static final Predicate<Link> typeContainsAdmin = new Predicate<Link>() {
-      @Override
-      public boolean apply(Link in) {
-         return in.getType().indexOf(".admin.") != -1;
-      }
-   };
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/IdToHref.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/IdToHref.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/IdToHref.java
deleted file mode 100644
index 790e1ed..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/IdToHref.java
+++ /dev/null
@@ -1,51 +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.vcloud.director.v1_5.functions;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.get;
-
-import java.net.URI;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.vcloud.director.v1_5.domain.Entity;
-
-import com.google.common.base.Function;
-import com.google.common.cache.LoadingCache;
-
-/**
- * Resolves URN to its HREF via the entity Resolver, caching to avoid excess network requests.
- */
-@Singleton
-public final class IdToHref implements Function<String, URI> {
-   private final LoadingCache<String, Entity> resolveEntityCache;
-
-   @Inject
-   public IdToHref(LoadingCache<String, Entity> resolveEntityCache) {
-      this.resolveEntityCache = checkNotNull(resolveEntityCache, "resolveEntityCache");
-   }
-
-   @Override
-   public URI apply(String urn) {
-      Entity entity = resolveEntityCache.getUnchecked(checkNotNull(urn, "urn"));
-      checkArgument(entity.getLinks().size() > 0, "no links found for entity %s", entity);
-      return get(entity.getLinks(), 0).getHref();
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/RegexValueParser.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/RegexValueParser.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/RegexValueParser.java
deleted file mode 100644
index ad93b7f..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/RegexValueParser.java
+++ /dev/null
@@ -1,52 +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.vcloud.director.v1_5.functions;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.inject.Inject;
-
-import org.jclouds.http.HttpResponse;
-import org.jclouds.http.functions.ReturnStringIf2xx;
-
-import com.google.common.base.Function;
-import com.google.inject.Singleton;
-
-@Singleton
-public class RegexValueParser implements Function<HttpResponse, String> {
-   Pattern pattern = Pattern.compile("<Value>([^<]+)</Value>");
-   private final ReturnStringIf2xx returnStringIf200;
-
-   @Inject
-   RegexValueParser(ReturnStringIf2xx returnStringIf200) {
-      this.returnStringIf200 = returnStringIf200;
-   }
-
-   @Override
-   public String apply(HttpResponse response) {
-      String content = returnStringIf200.apply(response);
-      if (content != null) {
-         Matcher matcher = pattern.matcher(content);
-         if (matcher.find()) {
-            return matcher.group(1);
-         }
-      }
-      return null;
-   }
-
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/ReturnPayloadBytes.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/ReturnPayloadBytes.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/ReturnPayloadBytes.java
deleted file mode 100644
index 03cce1c..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/ReturnPayloadBytes.java
+++ /dev/null
@@ -1,40 +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.vcloud.director.v1_5.functions;
-
-import java.io.IOException;
-
-import javax.inject.Singleton;
-
-import org.jclouds.http.HttpResponse;
-import org.jclouds.io.ByteStreams2;
-
-import com.google.common.base.Function;
-import com.google.common.base.Throwables;
-
-@Singleton
-public class ReturnPayloadBytes implements Function<HttpResponse, byte[]> {
-
-   @Override
-   public byte[] apply(HttpResponse from) {
-      try {
-         return ByteStreams2.toByteArrayAndClose(from.getPayload().openStream());
-      } catch (IOException e) {
-         throw Throwables.propagate(e);
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/SectionForVApp.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/SectionForVApp.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/SectionForVApp.java
deleted file mode 100644
index ef48233..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/SectionForVApp.java
+++ /dev/null
@@ -1,42 +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.vcloud.director.v1_5.functions;
-
-import org.jclouds.dmtf.ovf.SectionType;
-import org.jclouds.vcloud.director.v1_5.domain.AbstractVApp;
-
-import com.google.common.base.Function;
-
-public class SectionForVApp<S extends SectionType> implements Function<AbstractVApp, S> {
-   
-   private final Class<? extends SectionType> sectionType;
-
-   public SectionForVApp(Class<S> sectionType) {
-      this.sectionType = sectionType;
-   }
-
-   @SuppressWarnings("unchecked")
-   @Override
-   public S apply(AbstractVApp from) {
-      for (SectionType section : from.getSections()) {
-         if (sectionType.isAssignableFrom(section.getClass())) {
-            return (S)section;
-         }
-      }
-      return null;
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/SectionForVAppTemplate.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/SectionForVAppTemplate.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/SectionForVAppTemplate.java
deleted file mode 100644
index 394baa1..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/functions/SectionForVAppTemplate.java
+++ /dev/null
@@ -1,47 +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.vcloud.director.v1_5.functions;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.dmtf.ovf.SectionType;
-import org.jclouds.vcloud.director.v1_5.domain.VAppTemplate;
-
-import com.google.common.base.Function;
-
-@Singleton
-public class SectionForVAppTemplate<S extends SectionType> implements Function<VAppTemplate, S> {
-   
-   private final Class<? extends SectionType> sectionType;
-
-   @Inject
-   SectionForVAppTemplate(Class<S> sectionType) {
-      this.sectionType = sectionType;
-   }
-
-   @SuppressWarnings("unchecked")
-   @Override
-   public S apply(VAppTemplate from) {
-      for (SectionType section : from.getSections()) {
-         if (sectionType.isAssignableFrom(section.getClass())) {
-            return (S)section;
-         }
-      }
-      return null;
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/handlers/InvalidateSessionAndRetryOn401AndLogoutOnClose.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/handlers/InvalidateSessionAndRetryOn401AndLogoutOnClose.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/handlers/InvalidateSessionAndRetryOn401AndLogoutOnClose.java
deleted file mode 100644
index 25b9f7b..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/handlers/InvalidateSessionAndRetryOn401AndLogoutOnClose.java
+++ /dev/null
@@ -1,87 +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.vcloud.director.v1_5.handlers;
-
-import static org.jclouds.http.HttpUtils.closeClientButKeepContentStream;
-import static org.jclouds.http.HttpUtils.releasePayload;
-
-import javax.annotation.PreDestroy;
-import javax.annotation.Resource;
-
-import org.jclouds.domain.Credentials;
-import org.jclouds.http.HttpCommand;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.http.handlers.BackoffLimitedRetryHandler;
-import org.jclouds.logging.Logger;
-import org.jclouds.vcloud.director.v1_5.domain.SessionWithToken;
-import org.jclouds.vcloud.director.v1_5.login.SessionApi;
-
-import com.google.common.cache.LoadingCache;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-
-/**
- * If the credentials supplied in the authentication header are invalid, or if the token has
- * expired, the server returns HTTP response code 401. The token expires after a configurable
- * interval of api inactivity. The default is 30 minutes after the token is created. After the
- * token expires, you must log in again to obtain a new token.
- */
-@Singleton
-public class InvalidateSessionAndRetryOn401AndLogoutOnClose extends BackoffLimitedRetryHandler {
-   @Resource
-   protected Logger logger = Logger.NULL;
-
-   private final LoadingCache<Credentials, SessionWithToken> authenticationResponseCache;
-   private final SessionApi sessionApi;
-
-   @Inject
-   protected InvalidateSessionAndRetryOn401AndLogoutOnClose(
-            LoadingCache<Credentials, SessionWithToken> authenticationResponseCache, SessionApi sessionApi) {
-      this.authenticationResponseCache = authenticationResponseCache;
-      this.sessionApi = sessionApi;
-   }
-
-   @Override
-   public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) {
-      boolean retry = false; // default
-      try {
-         if (response.getStatusCode() == 401) {
-            closeClientButKeepContentStream(response);
-            logger.debug("invalidating session");
-            authenticationResponseCache.invalidateAll();
-            retry = super.shouldRetryRequest(command, response);
-         }
-         return retry;
-      } finally {
-         releasePayload(response);
-      }
-   }
-
-   /**
-    * it is important that we close any sessions on close to help the server not become overloaded.
-    */
-   @PreDestroy
-   public void logoutOnClose() {
-      for (SessionWithToken s : authenticationResponseCache.asMap().values()) {
-         try {
-            sessionApi.logoutSessionWithToken(s.getSession().getHref(), s.getToken());
-         } catch (Exception e) {
-            logger.error(e, "error logging out session %s", s.getSession());
-         }
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/handlers/VCloudDirectorErrorHandler.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/handlers/VCloudDirectorErrorHandler.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/handlers/VCloudDirectorErrorHandler.java
deleted file mode 100644
index 23a42a7..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/handlers/VCloudDirectorErrorHandler.java
+++ /dev/null
@@ -1,74 +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.vcloud.director.v1_5.handlers;
-
-import static org.jclouds.http.HttpUtils.closeClientButKeepContentStream;
-
-import java.io.ByteArrayInputStream;
-import javax.inject.Singleton;
-import javax.xml.bind.JAXB;
-
-import org.jclouds.http.HttpCommand;
-import org.jclouds.http.HttpErrorHandler;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.http.HttpResponseException;
-import org.jclouds.rest.AuthorizationException;
-import org.jclouds.rest.ResourceNotFoundException;
-import org.jclouds.vcloud.director.v1_5.VCloudDirectorException;
-import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
-import org.jclouds.vcloud.director.v1_5.domain.Error;
-
-import com.google.common.base.Throwables;
-
-/**
- * This will parse and set an appropriate exception on the command object.
- */
-@Singleton
-public class VCloudDirectorErrorHandler implements HttpErrorHandler {
-
-   @Override
-   public void handleError(HttpCommand command, HttpResponse response) {
-      // it is important to always read fully and close streams
-      byte[] data = closeClientButKeepContentStream(response);
-
-      // Create default exception
-      String message = data != null
-            ? new String(data)
-            : String.format("%s -> %s", command.getCurrentRequest().getRequestLine(), response.getStatusLine());
-      Exception exception = new HttpResponseException(command, response, message);
-      
-      // Try to create a VCloudDirectorException from XML payload, if it exists
-      if (response.getPayload() != null && response.getPayload().getContentMetadata().getContentType().startsWith(VCloudDirectorMediaType.ERROR)) {
-	      try {
-	         Error error = JAXB.unmarshal(new ByteArrayInputStream(data), Error.class);
-	         exception = new VCloudDirectorException(error);
-	         message = error.getMessage();
-	      } catch (Exception e) {
-	         Throwables.propagate(e);
-	      }
-      }
-
-      // Create custom exception for error codes we know about
-      if (response.getStatusCode() == 401) {
-         exception = new AuthorizationException(message, exception);
-      } else if (response.getStatusCode() == 403 || response.getStatusCode() == 404) {
-         exception = new ResourceNotFoundException(message, exception);
-      }
-
-      command.setException(exception);
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/internal/VCloudDirectorContextImpl.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/internal/VCloudDirectorContextImpl.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/internal/VCloudDirectorContextImpl.java
deleted file mode 100644
index 1d15f40..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/internal/VCloudDirectorContextImpl.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.vcloud.director.v1_5.internal;
-
-import java.net.URI;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.annotations.Name;
-import org.jclouds.domain.Credentials;
-import org.jclouds.lifecycle.Closer;
-import org.jclouds.location.Provider;
-import org.jclouds.providers.ProviderMetadata;
-import org.jclouds.rest.ApiContext;
-import org.jclouds.rest.Utils;
-import org.jclouds.rest.internal.ApiContextImpl;
-import org.jclouds.vcloud.director.v1_5.VCloudDirectorContext;
-import org.jclouds.vcloud.director.v1_5.admin.VCloudDirectorAdminApi;
-import org.jclouds.vcloud.director.v1_5.functions.IdToAdminHref;
-import org.jclouds.vcloud.director.v1_5.functions.IdToHref;
-import org.jclouds.vcloud.director.v1_5.user.VCloudDirectorApi;
-
-import com.google.common.base.Function;
-import com.google.common.base.Supplier;
-import com.google.inject.Injector;
-import com.google.inject.TypeLiteral;
-
-@Singleton
-public class VCloudDirectorContextImpl extends ApiContextImpl<VCloudDirectorApi> implements VCloudDirectorContext {
-   private final ApiContext<VCloudDirectorAdminApi> adminContext;
-   private final Function<String, URI> idToHref;
-   private final Function<String, URI> idToAdminHref;
-
-   @Inject VCloudDirectorContextImpl(@Name String name, ProviderMetadata providerMetadata,
-         @Provider Supplier<Credentials> creds, Utils utils, Closer closer, Injector injector,
-         ApiContext<VCloudDirectorAdminApi> adminContext, IdToHref idToHref, IdToAdminHref idToAdminHref) {
-      super(name, providerMetadata, creds, utils, closer, injector, TypeLiteral.get(VCloudDirectorApi.class));
-      this.adminContext = adminContext;
-      this.idToHref = idToHref;
-      this.idToAdminHref = idToAdminHref;
-
-   }
-
-   @Override
-   public ApiContext<VCloudDirectorAdminApi> getAdminContext() {
-      return adminContext;
-   }
-
-   @Override public URI resolveIdToHref(String id) {
-      return idToHref.apply(id);
-   }
-
-   @Override public URI resolveIdToAdminHref(String adminId) {
-      return idToAdminHref.apply(adminId);
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/loaders/LoginUserInOrgWithPassword.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/loaders/LoginUserInOrgWithPassword.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/loaders/LoginUserInOrgWithPassword.java
deleted file mode 100644
index 8444e9e..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/loaders/LoginUserInOrgWithPassword.java
+++ /dev/null
@@ -1,55 +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.vcloud.director.v1_5.loaders;
-
-import java.net.URI;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.domain.Credentials;
-import org.jclouds.vcloud.director.v1_5.annotations.Login;
-import org.jclouds.vcloud.director.v1_5.domain.SessionWithToken;
-import org.jclouds.vcloud.director.v1_5.login.SessionApi;
-
-import com.google.common.base.Supplier;
-import com.google.common.cache.CacheLoader;
-
-@Singleton
-public class LoginUserInOrgWithPassword extends CacheLoader<Credentials, SessionWithToken> {
-   private final SessionApi api;
-   private final Supplier<URI> loginUrl;
-
-   @Inject
-   public LoginUserInOrgWithPassword(SessionApi api, @Login Supplier<URI> loginUrl) {
-      this.api = api;
-      this.loginUrl = loginUrl;
-   }
-
-   @Override
-   public SessionWithToken load(Credentials input) {
-      String user = input.identity.substring(0, input.identity.lastIndexOf('@'));
-      String org = input.identity.substring(input.identity.lastIndexOf('@') + 1);
-      String password = input.credential;
-      return api.loginUserInOrgWithPassword(loginUrl.get(), user, org, password);
-   }
-
-   @Override
-   public String toString() {
-      return "loginUserInOrgWithPassword()";
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/loaders/ResolveEntity.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/loaders/ResolveEntity.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/loaders/ResolveEntity.java
deleted file mode 100644
index 009105e..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/loaders/ResolveEntity.java
+++ /dev/null
@@ -1,47 +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.vcloud.director.v1_5.loaders;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.vcloud.director.v1_5.domain.Entity;
-import org.jclouds.vcloud.director.v1_5.user.VCloudDirectorApi;
-
-import com.google.common.cache.CacheLoader;
-
-@Singleton
-public class ResolveEntity extends CacheLoader<String, Entity> {
-   private final VCloudDirectorApi api;
-
-   @Inject
-   public ResolveEntity(VCloudDirectorApi api) {
-      this.api = checkNotNull(api, "api");
-   }
-
-   @Override
-   public Entity load(String input) {
-      return api.resolveEntity(checkNotNull(input, "urn"));
-   }
-
-   @Override
-   public String toString() {
-      return "resolveEntity()";
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/login/SessionApi.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/login/SessionApi.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/login/SessionApi.java
deleted file mode 100644
index 272789b..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/login/SessionApi.java
+++ /dev/null
@@ -1,58 +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.vcloud.director.v1_5.login;
-
-import java.net.URI;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.HeaderParam;
-import javax.ws.rs.POST;
-
-import org.jclouds.rest.annotations.EndpointParam;
-import org.jclouds.rest.annotations.JAXBResponseParser;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.vcloud.director.v1_5.binders.BindUserOrgAndPasswordAsBasicAuthorizationHeader;
-import org.jclouds.vcloud.director.v1_5.domain.Session;
-import org.jclouds.vcloud.director.v1_5.domain.SessionWithToken;
-import org.jclouds.vcloud.director.v1_5.parsers.SessionWithTokenFromXMLAndHeader;
-
-public interface SessionApi {
-
-   @POST
-   @Consumes
-   @ResponseParser(SessionWithTokenFromXMLAndHeader.class)
-   @MapBinder(BindUserOrgAndPasswordAsBasicAuthorizationHeader.class)
-   SessionWithToken loginUserInOrgWithPassword(@EndpointParam URI loginUrl,
-         @PayloadParam("user") String user, @PayloadParam("org") String org,
-         @PayloadParam("password") String password);
-
-   @GET
-   @Consumes
-   @JAXBResponseParser
-   Session getSessionWithToken(@EndpointParam URI session,
-         @HeaderParam("x-vcloud-authorization") String authenticationToken);
-
-   @DELETE
-   @Consumes
-   @JAXBResponseParser
-   void logoutSessionWithToken(@EndpointParam URI session,
-         @HeaderParam("x-vcloud-authorization") String authenticationToken);
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/parsers/SessionWithTokenFromXMLAndHeader.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/parsers/SessionWithTokenFromXMLAndHeader.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/parsers/SessionWithTokenFromXMLAndHeader.java
deleted file mode 100644
index 23861a2..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/parsers/SessionWithTokenFromXMLAndHeader.java
+++ /dev/null
@@ -1,48 +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.vcloud.director.v1_5.parsers;
-
-import javax.annotation.Resource;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.http.HttpResponse;
-import org.jclouds.http.functions.ParseXMLWithJAXB;
-import org.jclouds.logging.Logger;
-import org.jclouds.vcloud.director.v1_5.domain.Session;
-import org.jclouds.vcloud.director.v1_5.domain.SessionWithToken;
-
-import com.google.common.base.Function;
-
-@Singleton
-public class SessionWithTokenFromXMLAndHeader implements Function<HttpResponse, SessionWithToken> {
-   @Resource
-   protected Logger logger = Logger.NULL;
-   private ParseXMLWithJAXB<Session> sessionParser;
-
-   @Inject
-   public SessionWithTokenFromXMLAndHeader(ParseXMLWithJAXB<Session> sessionParser) {
-      this.sessionParser = sessionParser;
-   }
-
-   @Override
-   public SessionWithToken apply(final HttpResponse from) {
-      Session session = sessionParser.apply(from);
-      return SessionWithToken.builder().session(session).token(from.getFirstHeaderOrNull("x-vcloud-authorization"))
-               .build();
-   }
-}