<disk_attachment>
<bootable>true</bootable>
<interface>ide</interface>
<disk id="123"/>
</disk_attachment>
public class DiskAttachmentsServiceImpl extends ServiceImpl implements DiskAttachmentsService
DiskAttachmentsService.AddRequest, DiskAttachmentsService.AddResponse, DiskAttachmentsService.ListRequest, DiskAttachmentsService.ListResponse
Constructor and Description |
---|
DiskAttachmentsServiceImpl(HttpConnection connection,
String path) |
Modifier and Type | Method and Description |
---|---|
DiskAttachmentsService.AddRequest |
add()
Adds a new disk attachment to the virtual machine.
|
DiskAttachmentService |
attachmentService(String id)
Reference to the service that manages a specific attachment.
|
DiskAttachmentsService.ListRequest |
list()
List the disk that are attached to the virtual machine.
|
Service |
service(String path)
Service locator method, returns individual service on which the URI is dispatched.
|
String |
toString() |
checkAction, checkFault, getConnection, getPath, throwError
public DiskAttachmentsServiceImpl(HttpConnection connection, String path)
public DiskAttachmentsService.AddRequest add()
DiskAttachmentsService
Adds a new disk attachment to the virtual machine. The attachment
parameter can contain just a reference, if
the disk already exists:
<disk_attachment>
<bootable>true</bootable>
<interface>ide</interface>
<disk id="123"/>
</disk_attachment>
Or it can contain the complete representation of the disk, if the disk doesn’t exist yet:
<disk_attachment>
<bootable>true</bootable>
<interface>ide</interface>
<disk>
<name>mydisk</name>
<provisioned_size>1024</provisioned_size>
...
</disk>
</disk_attachment>
In this case the disk will be created and then attached to the virtual machine.
add
in interface DiskAttachmentsService
public DiskAttachmentsService.ListRequest list()
DiskAttachmentsService
List the disk that are attached to the virtual machine.
list
in interface DiskAttachmentsService
public DiskAttachmentService attachmentService(String id)
DiskAttachmentsService
Reference to the service that manages a specific attachment.
attachmentService
in interface DiskAttachmentsService
public Service service(String path)
DiskAttachmentsService
Service locator method, returns individual service on which the URI is dispatched.
service
in interface DiskAttachmentsService
Copyright © 2016. All rights reserved.