> +    * Retrieve the virtual machine this volume is attached to.
> +    * 
> +    * @return The virtual machine this volume is attached to, or null if it 
> is
> +    * not attached.
> +    */
> +   public VirtualMachine getVirtualMachine() {
> +      checkState(ATTACHED == VolumeState.valueOf(target.getState()), "Volume 
> is not attached to a VM");
> +      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 = 
> context.utils()
> +            .injector()
> +            .getInstance(
> +                  Key.get(new 
> TypeLiteral<ParseXMLWithJAXB<VirtualMachineWithNodeExtendedDto>>(){}));

[minor] Odd formatting?
```
ParseXMLWithJAXB<VirtualMachineWithNodeExtendedDto> parser = 
context.utils().injector()
      .getInstance(Key.get(new 
TypeLiteral<ParseXMLWithJAXB<VirtualMachineWithNodeExtendedDto>>(){}));
```
or so? But also find to proceed without this.

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

Reply via email to