> +    * Retrieve the virtual machine this volume is attached to, or null if it 
> is
> +    * detached.
> +    * 
> +    * @return The virtual machine this volume is attached to, or null if it 
> is
> +    * not attached.
> +    */
> +   public VirtualMachine getVirtualMachine() {
> +      if ( ATTACHED == valueOf(target.getState()) ) {
> +         RESTLink vmLink = 
> checkNotNull(target.searchLink(ParentLinkName.VIRTUAL_MACHINE),
> +               ValidationErrors.MISSING_REQUIRED_LINK + " " + 
> ParentLinkName.VIRTUAL_MACHINE);
> +         vmLink.setType(VirtualMachineWithNodeExtendedDto.BASE_MEDIA_TYPE);
> +         HttpResponse response = context.getApi().get(vmLink);
> +
> +         ParseXMLWithJAXB<VirtualMachineWithNodeExtendedDto> parser = new 
> ParseXMLWithJAXB<VirtualMachineWithNodeExtendedDto>(
> +               context.utils().xml(),
> +               TypeLiteral.get(VirtualMachineWithNodeExtendedDto.class));

Is there any way we can make a "proper" API call here, rather than making a raw 
HTTP call as we do here and apply all the parsing etc. ourselves?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/31/files#r7264949

Reply via email to