Package com.abiquo.model.rest

Examples of com.abiquo.model.rest.RESTLink


    *      "http://community.abiquo.com/display/ABI20/StorageDeviceResource#StorageDeviceResource-Retrieveastoragedevice"
    *      > http://community.abiquo.com/display/ABI20/StorageDeviceResource#
    *      StorageDeviceResource- Retrieveastoragedevice</a>
    */
   public StorageDevice getStorageDevice() {
      RESTLink link = checkNotNull(target.searchLink(ParentLinkName.STORAGE_DEVICE),
            ValidationErrors.MISSING_REQUIRED_LINK + " " + ParentLinkName.STORAGE_DEVICE);

      HttpResponse response = context.getApi().get(link);

      ParseXMLWithJAXB<StorageDeviceDto> parser = new ParseXMLWithJAXB<StorageDeviceDto>(context.utils().xml(),
View Full Code Here


    * in Abiquo first.
    *
    * @return The tier assigned to this storage pool.
    */
   public Tier getTier() {
      RESTLink link = checkNotNull(target.searchLink(ParentLinkName.TIER), ValidationErrors.MISSING_REQUIRED_LINK + " "
            + ParentLinkName.TIER);

      HttpResponse response = context.getApi().get(link);

      ParseXMLWithJAXB<TierDto> parser = new ParseXMLWithJAXB<TierDto>(context.utils().xml(),
View Full Code Here

   public static PrivateIpDto privateIpPut() {
      PrivateIpDto ip = new PrivateIpDto();
      ip.setId(1);
      ip.setName("private ip");
      ip.setMac("00:58:5A:c0:C3:01");
      RESTLink self = new RESTLink("self", "http://localhost/api/cloud/virtualdatacenters/1/privatenetworks/1/ips/1");
      self.setTitle("privateip");
      ip.addLink(self);
      return ip;
   }
View Full Code Here

      return ip;
   }

   public static PublicIpDto publicIpToPurchase() {
      PublicIpDto ip = new PublicIpDto();
      RESTLink self = new RESTLink("purchase", "http://localhost/api/cloud/virtualdatacenters/5/publicips/purchased/1");
      ip.addLink(self);
      return ip;
   }
View Full Code Here

      return ip;
   }

   public static PublicIpDto publicIpToRelease() {
      PublicIpDto ip = new PublicIpDto();
      RESTLink self = new RESTLink("release", "http://localhost/api/cloud/virtualdatacenters/5/publicips/topurchase/1");
      ip.addLink(self);
      return ip;
   }
View Full Code Here

   public static NicDto nicPut() {
      NicDto nic = new NicDto();
      nic.setId(1);
      nic.setIp("123.123.123.123");
      nic.setMac("00:58:5A:c0:C3:01");
      nic.addLink(new RESTLink("edit",
            "http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/nics/1"));

      return nic;
   }
View Full Code Here

      vlan.setDefaultNetwork(true);
      vlan.setName("DefaultNetwork");
      vlan.setGateway("192.168.1.1");
      vlan.setMask(24);
      vlan.setType(NetworkType.INTERNAL);
      vlan.addLink(new RESTLink("edit", "http://localhost/api/cloud/virtualdatacenters/1/privatenetworks/1"));
      vlan.addLink(new RESTLink("ips", "http://localhost/api/cloud/virtualdatacenters/1/privatenetworks/1/ips"));

      return vlan;
   }
View Full Code Here

      vlan.setDefaultNetwork(true);
      vlan.setName("PublicNetwork");
      vlan.setGateway("192.168.1.1");
      vlan.setMask(24);
      vlan.setType(NetworkType.PUBLIC);
      vlan.addLink(new RESTLink("edit", "http://localhost/api/admin/datacenters/1/network/1"));
      vlan.addLink(new RESTLink("ips", "http://localhost/api/admin/datacenters/1/network/1/ips"));

      return vlan;
   }
View Full Code Here

      vlan.setDefaultNetwork(true);
      vlan.setName("ExternalNetwork");
      vlan.setGateway("192.168.1.1");
      vlan.setMask(24);
      vlan.setType(NetworkType.EXTERNAL);
      vlan.addLink(new RESTLink("edit", "http://localhost/api/admin/datacenters/1/network/1"));
      vlan.addLink(new RESTLink("enterprise", "http://localhost/api/admin/enterprises/1"));
      vlan.addLink(new RESTLink("ips", "http://localhost/api/admin/enterprises/1/limits/1/externalnetworks/1/ips"));

      return vlan;
   }
View Full Code Here

      vlan.setDefaultNetwork(true);
      vlan.setName("UnmanagedNetwork");
      vlan.setGateway("192.168.1.1");
      vlan.setMask(24);
      vlan.setType(NetworkType.UNMANAGED);
      vlan.addLink(new RESTLink("edit", "http://localhost/api/admin/datacenters/1/network/1"));
      vlan.addLink(new RESTLink("enterprise", "http://localhost/api/admin/enterprises/1"));
      vlan.addLink(new RESTLink("ips", "http://localhost/api/admin/enterprises/1/limits/1/externalnetworks/1/ips"));

      return vlan;
   }
View Full Code Here

TOP

Related Classes of com.abiquo.model.rest.RESTLink

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.