clc.APIv2.disk
index
/Users//clc_git/src/clc/APIv2/disk.py

Disk related functions.  
 
Disks object variables:
 
Disk object variables:
 
        disk.id 
        disk.partition_paths - list of mounts paths
        disk.size - disk size in GB

 
Modules
       
clc
json
re
time

 
Classes
       
__builtin__.object
Disk
Disks

 
class Disk(__builtin__.object)
     Methods defined here:
Delete(self)
Delete disk.  
 
This request will error if disk is protected and cannot be removed (e.g. a system disk)
 
>>> clc.v2.Server("WA1BTDIX01").Disks().disks[2].Delete().WaitUntilComplete()
0
Grow(self, size)
Grow disk to the newly specified size.
 
Size must be less than 1024 and must be greater than the current size.
 
>>> clc.v2.Server("WA1BTDIX01").Disks().disks[2].Grow(30).WaitUntilComplete()
0
__getattr__(self, var)
__init__(self, id, parent, disk_obj=None)
Create Disk object.
__str__(self)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class Disks(__builtin__.object)
     Methods defined here:
Add(self, size, path=None, type='partitioned')
Add new disk.
 
This request will error if disk is protected and cannot be removed (e.g. a system disk)
 
# Partitioned disk
>>> clc.v2.Server("WA1BTDIX01").Disks().Add(size=20,path=None,type="raw").WaitUntilComplete()
0
 
# Raw disk
>>> clc.v2.Server("WA1BTDIX01").Disks().Add(size=20,path=None,type="raw").WaitUntilComplete()
0
Get(self, key)
Get disk by providing mount point or ID
 
If key is not unique and finds multiple matches only the first
will be returned
Search(self, key)
Search disk list by partial mount point or ID
__init__(self, server, disks_lst)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)