public VirtualAppliance build() {
      VirtualApplianceDto dto = new VirtualApplianceDto();
      dto.setName(name);

      VirtualAppliance virtualAppliance = new VirtualAppliance(context, dto);
      virtualAppliance.virtualDatacenter = virtualDatacenter;

      return virtualAppliance;
    }
Example #2
0
 public static VirtualApplianceDto virtualAppliancePut() {
   VirtualApplianceDto virtualAppliance = virtualAppliancePost();
   virtualAppliance.setId(1);
   virtualAppliance.addLink(
       new RESTLink("virtualdatacenter", "http://localhost/api/cloud/virtualdatacenters/1"));
   virtualAppliance.addLink(
       new RESTLink(
           "deploy",
           "http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/action/deploy"));
   virtualAppliance.addLink(
       new RESTLink(
           "edit", "http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1"));
   virtualAppliance.addLink(
       new RESTLink(
           "state", "http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/state"));
   virtualAppliance.addLink(
       new RESTLink(
           "undeploy",
           "http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/action/undeploy"));
   virtualAppliance.addLink(
       new RESTLink(
           "virtualmachines",
           "http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines"));
   virtualAppliance.addLink(
       new RESTLink(
           "price",
           "http://localhost/api/cloud/virtualdatacenters/1/virtualappliances/1/action/price"));
   return virtualAppliance;
 }
Example #3
0
 public static VirtualApplianceDto virtualAppliancePost() {
   VirtualApplianceDto virtualAppliance = new VirtualApplianceDto();
   virtualAppliance.setName("VA");
   return virtualAppliance;
 }