Handles creating, partitioning, and formatting a new EBS volume. By
default this class will format the entire drive (without partitioning)
using the ext3 filesystem.
host_instance - EC2 instance to use when formatting volume. must exist
in the same zone as the new volume. if not specified this class will look
for host instances in the @sc-volumecreator security group. If it can't
find an instance in the @sc-volumecreator group that matches the zone of
the new volume, a new instance is launched.
shutdown_instance - True will shutdown the host instance after volume
creation
|
__init__(self,
ec2_conn,
spot_bid=None,
keypair=None,
key_location=None,
host_instance=None,
device=' /dev/sdz ' ,
image_id=' ami-8cf913e5 ' ,
instance_type=' m1.small ' ,
shutdown_instance=False,
detach_vol=False,
mkfs_cmd=' mkfs.ext3 ' ,
resizefs_cmd=' resize2fs ' ,
**kwargs)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
|
_get_existing_instance(self,
zone)
Returns any existing instance in the @sc-volumecreator group that's
located in zone. |
source code
|
|
|
|
|
_create_volume(self,
size,
zone,
snapshot_id=None) |
source code
|
|
|
|
|
_attach_volume(self,
vol,
instance_id,
device) |
source code
|
|
|
_validate_host_instance(self,
instance,
zone) |
source code
|
|
|
_validate_image_and_type(self,
image,
itype) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
is_valid(self,
size,
zone,
device)
Returns True if all cluster template settings are valid |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from cluster.Cluster :
__getstate__ ,
__str__ ,
add_node ,
add_nodes ,
attach_volumes_to_master ,
create_cluster ,
create_node ,
create_nodes ,
detach_volumes ,
get ,
get_node_by_alias ,
get_node_by_dns_name ,
get_node_by_id ,
get_spinner ,
is_cluster_compute ,
is_cluster_stopped ,
is_cluster_terminated ,
is_cluster_up ,
is_ebs_cluster ,
is_running_valid ,
load_plugins ,
load_receipt ,
load_volumes ,
remove_node ,
remove_nodes ,
restart_cluster ,
run_plugin ,
run_plugins ,
ssh_to_master ,
ssh_to_node ,
start ,
stop_cluster ,
terminate_cluster ,
update ,
wait_for_cluster
Inherited from cluster.Cluster (private):
_create_flat_rate_cluster ,
_create_spot_cluster ,
_get_launch_map ,
_get_next_node_num ,
_get_type_and_image_id ,
_has_all_required_settings ,
_nodes_in_states ,
_setup_cluster ,
_start ,
_validate ,
_validate_cluster_compute ,
_validate_cluster_size ,
_validate_credentials ,
_validate_ebs_aws_settings ,
_validate_ebs_settings ,
_validate_image_settings ,
_validate_instance_types ,
_validate_keypair ,
_validate_permission_settings ,
_validate_running_instances ,
_validate_shell_setting ,
_validate_spot_bid
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|