Skip to content
Snippets Groups Projects
Commit 0e9dd35a authored by Yas Naoi's avatar Yas Naoi
Browse files

Added Cloud n support (view only) and aws_cloud_services module for RESTful API Interface

parent d9dd1313
No related branches found
No related tags found
No related merge requests found
Showing with 414 additions and 127 deletions
CHANGE HISTORY
==============
2012/09/02 7.x-1.x-dev (Fixed) Issue #1729788
2012/08/23 7.x-1.x-dev (Fixed) Issue #1744294
2012/07/30 7.x-1.x-dev (Updated)
2015/05/07 7.x-1.x-dev
- Added Cloud n Support (View only due to the spec of Cloud n which requires 'template'
- Added aws_cloud_services module for RESTful API Interface
2015/05/06 7.x-1.0
- Released
2012/09/02 7.x-1.x-dev
- (Fixed) Issue #1729788
2012/08/23 7.x-1.x-dev
- (Fixed) Issue #1744294
2012/07/30 7.x-1.x-dev
- (Updated)
2012/05/15 7.x-1.x-dev
- Updated Failover, Monitor, Dashboard, Metering for D7 changes
2012/03/27 7.x-1.x-dev
......
name = AWS Cloud
description = Amazon Web Services Compatible Cloud (incl. Amazon EC2, OpenStack nova, and Eucalyptus) Implementation
description = Amazon Web Services Compatible Cloud (incl. Amazon EC2, OpenStack nova, Eucalyptus and Cloud n) Implementation
package = IaaS
dependencies[] = cloud
dependencies[] = cloud_server_templates
......
......@@ -1141,19 +1141,19 @@ function aws_cloud_aws_cloud_data() {
$data['amazon'] = array(
'name' => AWS_CLOUD_AMAZON_INSTANCE_NAME,
'instance_types' => array(
't1.micro' => 't1.micro' ,
'm1.small' => 'm1.small' ,
'm1.medium' => 'm1.medium' ,
'm1.large' => 'm1.large' ,
'm1.xlarge' => 'm1.xlarge' ,
'c1.medium' => 'c1.medium' ,
'c1.xlarge' => 'c1.xlarge' ,
'm2.xlarge' => 'm2.xlarge' ,
'm2.2xlarge' => 'm2.2xlarge' ,
'm2.4xlarge' => 'm2.4xlarge' ,
'cc1.4xlarge' => 'cc1.4xlarge' ,
'cc2.8xlarge' => 'cc2.8xlarge' ,
'cg1.4xlarge' => 'cg1.4xlarge' ,
't1.micro' => 't1.micro' ,
'm1.small' => 'm1.small' ,
'm1.medium' => 'm1.medium' ,
'm1.large' => 'm1.large' ,
'm1.xlarge' => 'm1.xlarge' ,
'c1.medium' => 'c1.medium' ,
'c1.xlarge' => 'c1.xlarge' ,
'm2.xlarge' => 'm2.xlarge' ,
'm2.2xlarge' => 'm2.2xlarge' ,
'm2.4xlarge' => 'm2.4xlarge' ,
'cc1.4xlarge' => 'cc1.4xlarge',
'cc2.8xlarge' => 'cc2.8xlarge',
'cg1.4xlarge' => 'cg1.4xlarge',
),
/* Pricing data as of 04/09/2012 */
......@@ -1162,88 +1162,88 @@ function aws_cloud_aws_cloud_data() {
'cloud_pricing_data' => array(
// Micro On-Demand Instances
't1.micro' => array(
'instance_type' => 't1.micro' ,
'description' => t('Micro') ,
'linux_or_unix_cost' => '0.02' ,
'windows_cost' => '0.03' ,
'instance_type' => 't1.micro' ,
'description' => t('Micro') ,
'linux_or_unix_cost' => '0.02' ,
'windows_cost' => '0.03' ,
),
// Standard On-Demand Instances
'm1.small' => array(
'instance_type' => 'm1.small' ,
'description' => t('Small (Default)') ,
'linux_or_unix_cost' => '0.08' ,
'windows_cost' => '0.115' ,
'instance_type' => 'm1.small' ,
'description' => t('Small (Default)') ,
'linux_or_unix_cost' => '0.08' ,
'windows_cost' => '0.115' ,
),
'm1.medium' => array(
'instance_type' => 'm1.medium' ,
'description' => t('Medium') ,
'linux_or_unix_cost' => '0.16' ,
'windows_cost' => '0.23' ,
'instance_type' => 'm1.medium' ,
'description' => t('Medium') ,
'linux_or_unix_cost' => '0.16' ,
'windows_cost' => '0.23' ,
),
'm1.large' => array(
'instance_type' => 'm1.large' ,
'description' => t('Large') ,
'linux_or_unix_cost' => '0.32' ,
'windows_cost' => '0.46' ,
'instance_type' => 'm1.large' ,
'description' => t('Large') ,
'linux_or_unix_cost' => '0.32' ,
'windows_cost' => '0.46' ,
),
'm1.xlarge' => array(
'instance_type' => 'm1.xlarge' ,
'description' => t('Extra Large') ,
'linux_or_unix_cost' => '0.64' ,
'windows_cost' => '0.92' ,
'instance_type' => 'm1.xlarge' ,
'description' => t('Extra Large') ,
'linux_or_unix_cost' => '0.64' ,
'windows_cost' => '0.92' ,
),
// Hi-Memory On-Demand Instances
'm2.xlarge' => array(
'instance_type' => 'm2.xlarge' ,
'description' => t('Hi-Memory On-Demand Extra Large') ,
'linux_or_unix_cost' => '0.45' ,
'windows_cost' => '0.57' ,
'instance_type' => 'm2.xlarge' ,
'description' => t('Hi-Memory On-Demand Extra Large') ,
'linux_or_unix_cost' => '0.45' ,
'windows_cost' => '0.57' ,
),
'm2.2xlarge' => array(
'instance_type' => 'm2.2xlarge' ,
'description' => t('Hi-Memory On-Demand Double Extra Large') ,
'linux_or_unix_cost' => '0.9' ,
'windows_cost' => '1.14' ,
'instance_type' => 'm2.2xlarge' ,
'description' => t('Hi-Memory On-Demand Double Extra Large') ,
'linux_or_unix_cost' => '0.9' ,
'windows_cost' => '1.14' ,
),
'm2.4xlarge' => array(
'instance_type' => 'm2.4xlarge' ,
'description' => t('Hi-Memory On-Demand Quadruple Extra Large') ,
'linux_or_unix_cost' => '1.8' ,
'windows_cost' => '2.28' ,
'instance_type' => 'm2.4xlarge' ,
'description' => t('Hi-Memory On-Demand Quadruple Extra Large'),
'linux_or_unix_cost' => '1.8' ,
'windows_cost' => '2.28' ,
),
// Hi-CPU On-Demand Instances
'c1.medium' => array(
'instance_type' => 'c1.medium' ,
'description' => t('High-CPU Medium') ,
'linux_or_unix_cost' => '0.165' ,
'windows_cost' => '0.285' ,
'instance_type' => 'c1.medium' ,
'description' => t('High-CPU Medium') ,
'linux_or_unix_cost' => '0.165' ,
'windows_cost' => '0.285' ,
),
'c1.xlarge' => array(
'instance_type' => 'c1.xlarge' ,
'description' => t('High-CPU Extra Large') ,
'linux_or_unix_cost' => '0.68' ,
'windows_cost' => '1.16' ,
'instance_type' => 'c1.xlarge' ,
'description' => t('High-CPU Extra Large') ,
'linux_or_unix_cost' => '0.68' ,
'windows_cost' => '1.16' ,
),
// Cluster Compute Instances
'cc1.4xlarge' => array(
'instance_type' => 'cc1.4xlarge' ,
'description' => t('Cluster Compute Quadruple Extra Large') ,
'linux_or_unix_cost' => '1.30' ,
'windows_cost' => '1.61' ,
'instance_type' => 'cc1.4xlarge' ,
'description' => t('Cluster Compute Quadruple Extra Large') ,
'linux_or_unix_cost' => '1.30' ,
'windows_cost' => '1.61' ,
),
'cc2.8xlarge' => array(
'instance_type' => 'cc2.8xlarge' ,
'description' => t('Cluster Compute Eight Extra Large') ,
'linux_or_unix_cost' => '2.40' ,
'windows_cost' => '2.97' ,
'instance_type' => 'cc2.8xlarge' ,
'description' => t('Cluster Compute Eight Extra Large') ,
'linux_or_unix_cost' => '2.40' ,
'windows_cost' => '2.97' ,
),
'cg1.4xlarge' => array(
'instance_type' => 'cg1.4xlarge' ,
'description' => t('Cluster GPU Quadruple Extra Large') ,
'linux_or_unix_cost' => '2.10' ,
'windows_cost' => '2.60' ,
'instance_type' => 'cg1.4xlarge' ,
'description' => t('Cluster GPU Quadruple Extra Large') ,
'linux_or_unix_cost' => '2.10' ,
'windows_cost' => '2.60' ,
),
),
);
......@@ -1255,35 +1255,35 @@ function aws_cloud_aws_cloud_data() {
$data['openstack_nova'] = array(
'name' => AWS_CLOUD_OPENSTACK_INSTANCE_NAME,
'instance_types' => array(
'm1.tiny' => 'm1.tiny' ,
'm1.small' => 'm1.small',
'm1.medium' => 'm1.medium',
'm1.small' => 'm1.large',
'm1.tiny' => 'm1.tiny' ,
'm1.small' => 'm1.small' ,
'm1.medium' => 'm1.medium' ,
'm1.large' => 'm1.large' ,
),
'cloud_pricing_data' => array(
'm1.tiny' => array(
'instance_type' => 'm1.tiny',
'description' => t('Tiny'),
'linux_or_unix_cost' => '0.02' ,
'windows_cost' => '0.03' ,
'instance_type' => 'm1.tiny' ,
'description' => t('Tiny') ,
'linux_or_unix_cost' => '0.02' ,
'windows_cost' => '0.03' ,
),
'm1.small' => array(
'instance_type' => 'm1.small' ,
'description ' => t('Small (Default)'),
'instance_type' => 'm1.small' ,
'description' => t('Small (Default)'),
'linux_or_unix_cost' => '0.085' ,
'windows_cost' => '0.12' ,
'windows_cost' => '0.12' ,
),
'm1.medium' => array(
'instance_type' => 'm1.medium',
'description' => t('Medium'),
'linux_or_unix_cost' => '0.17' ,
'windows_cost' => '0.29' ,
'instance_type' => 'm1.medium' ,
'description' => t('Medium') ,
'linux_or_unix_cost' => '0.17' ,
'windows_cost' => '0.29' ,
),
'm1.large' => array(
'instance_type' => 'm1.large',
'description' => t('Large'),
'linux_or_unix_cost' => '0.34' ,
'windows_cost' => '0.48' ,
'instance_type' => 'm1.large' ,
'description' => t('Large') ,
'linux_or_unix_cost' => '0.34' ,
'windows_cost' => '0.48' ,
),
),
);
......@@ -1291,35 +1291,78 @@ function aws_cloud_aws_cloud_data() {
$data['eucalyptus'] = array(
'name' => AWS_CLOUD_EUCALYPTUS_INSTANCE_NAME,
'instance_types' => array(
'm1.small' => 'm1.small',
'c1.medium' => 'c1.medium',
'm1.large' => 'm1.large',
'm1.xlarge' => 'm1.xlarge',
'm1.small' => 'm1.small' ,
'c1.medium' => 'c1.medium' ,
'm1.large' => 'm1.large' ,
'm1.xlarge' => 'm1.xlarge' ,
),
'cloud_pricing_data' => array(
'm1.small' => array(
'instance_type' => 'm1.small' ,
'description' => t('Small (Default)'),
'm1.small' => array(
'instance_type' => 'm1.small' ,
'description' => t('Small (Default)'),
'linux_or_unix_cost' => '0.085' ,
'windows_cost' => '0.12' ,
'windows_cost' => '0.12' ,
),
'c1.medium' => array(
'instance_type' => 'c1.medium',
'description' => t('Medium'),
'linux_or_unix_cost' => '0.17' ,
'windows_cost' => '0.29' ,
'instance_type' => 'c1.medium' ,
'description' => t('Medium') ,
'linux_or_unix_cost' => '0.17' ,
'windows_cost' => '0.29' ,
),
'm1.large' => array(
'instance_type' => 'm1.large' ,
'description' => t('Large') ,
'linux_or_unix_cost' => '0.34' ,
'windows_cost' => '0.48' ,
),
'm1.xlarge' => array(
'instance_type' => 'm1.xlarge' ,
'description' => t('Extra Large') ,
'linux_or_unix_cost' => '0.62' ,
'windows_cost' => '0.7' ,
),
),
);
$data['cloudn'] = array(
'name' => AWS_CLOUD_CLOUDN_INSTANCE_NAME,
'instance_types' => array(
't1.micro' => 't1.micro' ,
'm1.small' => 'm1.small' ,
'm1.medium' => 'm1.medium' ,
'm1.large' => 'm1.large' ,
'm1.xlarge' => 'm1.xlarge' ,
),
'cloud_pricing_data' => array(
't1.micro' => array(
'instance_type' => 't1.micro' ,
'description' => t('Plan vQ (1CPU / 0.5GB RAM)'),
'linux_or_unix_cost' => '0.009' ,
'windows_cost' => '0.009' ,
),
'm1.small' => array(
'instance_type' => 'm1.small' ,
'description' => t('Plan v1 (1CPU / 2GB RAM)') ,
'linux_or_unix_cost' => '0.0646' ,
'windows_cost' => '0.0646' ,
),
'm1.medium' => array(
'instance_type' => 'm1.medium' ,
'description' => t('Plan v2 (2CPU / 4GB RAM)') ,
'linux_or_unix_cost' => '0.1178' ,
'windows_cost' => '0.1178' ,
),
'm1.large' => array(
'instance_type' => 'm1.large',
'description' => t('Large'),
'linux_or_unix_cost' => '0.34' ,
'windows_cost' => '0.48' ,
'instance_type' => 'm1.large' ,
'description' => t('Plan v4 (4CPU / 8GB RAM)') ,
'linux_or_unix_cost' => '0.2356' ,
'windows_cost' => '0.2356' ,
),
'm1.xlarge' => array(
'instance_type' => 'm1.xlarge' ,
'description' => t('Extra Large'),
'linux_or_unix_cost' => '0.62' ,
'windows_cost' => '0.7' ,
'instance_type' => 'm1.xlarge' ,
'description' => t('Plan v8 (8CPU / 16GB RAM') ,
'linux_or_unix_cost' => '0.4712' ,
'windows_cost' => '0.4712' ,
),
),
);
......
<?php
// aws_cloud_services.inc
// updated by yas 2015/05/06
// created by yas 2015/08/25
/**
* Callback for listing all instances.
*
* @return objecct
*/
function _aws_cloud_services_index() {
$filter_params = array();
$all_instances_list = array();
$cloud_list = cloud_get_all_clouds();
foreach ($cloud_list as $cloud_context) {
if (user_access($cloud_context . ' ' . 'list instances') === FALSE) continue;
$instances = cloud_get_instances($cloud_context, $filter_params );
if (empty($instances) === FALSE) {
$instances_list = array();
foreach($instances as $instance) {
unset($instance['action_data']); // remove $instance['action_data'] since it is redundant
$instances_list[] = $instance;
}
$all_instances_list = array_merge( $all_instances_list, $instances_list );
}
}
return array('servers', $all_instances_list);
}
/**
* Callback for launching instances.
*
* @param object $instance
* @return object
*/
function _aws_cloud_services_launch($cloud_context, $instance) {
// Call launch instances function
return (object)array(
'instance_id' => $instance->instance_id,
'uri' => services_resource_uri(array('instance', $instance->instance_id)),
);
}
/**
* Callback for retrieving instances.
*
* @param string $cloud_context
* @param string $instance_id
* @return object
*/
function _aws_cloud_services_retrieve($cloud_context, $instance_id) {
$instance_info = _aws_cloud_get_instance_details_by_id($cloud_context, $instance_id);
return array('instance', $instance_info);
}
/**
* Callback for deleting instances.
*
* @param string $instance_id
* @return object
*/
function _aws_cloud_services_terminate($cloud_context, $instance_id) {
// needs to implement
return (object) array(
'instance_id' => $instance_id,
'uri' => services_resource_uri(array('instance', $instance_id)),
);
}
/**
* Access callback for the instances.
*
* @param string $op
* The operation that's going to be performed.
* @param array $args
* The arguments that will be passed to the callback.
* @return bool
* Whether access is given or not.
*/
function _aws_cloud_services_access($op, $args) {
$access = FALSE;
$cloud_context = $args[0]->cloud_context;
$instance_id = $args[1]->instance_id ;
switch ($op) {
case 'view':
$instance = _aws_cloud_get_instance_details_by_id($cloud_context, $instance_id);
$access = user_access($cloud_context . ' list instances');
break;
case 'launch':
// call launch instance function here
$access = user_access($cloud_context . ' launch instance');
break;
case 'terminate':
// call terminate instance function here
$access = user_access($cloud_context . ' terminate instance');
break;
}
return $access;
}
?>
\ No newline at end of file
name = Cloud Services
description = Sample Cloud Abstraction API implementation
package = Cloud
dependencies[] = aws_cloud
core = 7.x
files[] = aws_cloud_services.inc
files[] = aws_cloud_services.module
\ No newline at end of file
<?php
// aws_cloud_services.install
/**
* Implementation of hook_schema().
*/
?>
\ No newline at end of file
<?php
// aws_cloud_services.module
// updated by yas 2015/05/06
// created by yas 2015/08/25
/**
* Implementation of hook_services_resources().
*/
function aws_cloud_services_services_resources() {
return array(
'cloud' => array(
'retrieve' => array(
'help' => 'Retrieves an instance',
'file' => array('file' => 'inc', 'module' => 'aws_cloud_services'),
'callback' => '_aws_cloud_services_retrieve',
'access callback' => '_aws_cloud_services_access' ,
'access arguments' => array('view'),
'access arguments append' => TRUE,
'args' => array(
array(
'name' => 'cloud_context',
'type' => 'string',
'description' => 'The cloud name of the instance to get',
// 'source' => array('path' => '0'),
'source' => arg(2),
'optional' => FALSE,
),
array(
'name' => 'instance_id',
'type' => 'string',
'description' => 'The instance id of the instance to get',
// 'source' => array('path' => '1'),
'source' => arg(3),
'optional' => FALSE,
),
),
),
'index' => array(
'help' => 'Retrieve a listing of instances',
'file' => array('file' => 'inc', 'module' => 'aws_cloud_services'),
'callback' => '_aws_cloud_services_index',
'access callback' => 'user_access',
'access arguments' => array('access content'),
'access arguments append' => FALSE,
),
/*
'launch' => array(
'help' => 'Launch an instance',
'file' => array('file' => 'inc', 'module' => 'aws_cloud_services'),
'callback' => '_aws_cloud_services_launch',
'access arguments' => array('launch'),
'access arguments append' => FALSE,
'args' => array(
array(
'name' => 'instance',
'type' => 'struct',
'description' => 'The instance object',
'source' => 'instance',
'optional' => FALSE,
),
),
),
'terminate' => array(
'help' => 'Delete an instance',
'file' => array('file' => 'inc', 'module' => 'aws_cloud_services'),
'callback' => '_aws_cloud_services_delete_instance',
'access callback' => '_aws_cloud_services_access',
'access arguments' => array('terminate'),
'access arguments append' => TRUE,
'args' => array(
array(
'name' => 'instance_id',
'type' => 'string',
'description' => 'The instance id of the instance to delete',
'source' => array('path' => '0'),
'optional' => FALSE,
),
),
),
*/
),
);
}
?>
\ No newline at end of file
......@@ -8,15 +8,19 @@
*
*/
define('AWS_CLOUD_CONTEXT', 'aws_cloud');
define('AWS_CLOUD_DETAILS_TABLE', 'cloud_aws_cloud_details');
define('AWS_CLOUD_AMAZON_INSTANCE_NAME', 'Amazon');
define('AWS_CLOUD_OPENSTACK_INSTANCE_NAME', 'OpenStack');
define('AWS_CLOUD_EUCALYPTUS_INSTANCE_NAME', 'Eucalyptus');
define('AWS_CLOUD_LIST_PAGE', 'admin/config/clouds');
define('AWS_CLOUD_ADD_PAGE', 'admin/config/clouds/add');
define('AWS_CLOUD_MODULE_NAME', 'aws_cloud');
// updated by yas 2015/05/06
define('AWS_CLOUD_CONTEXT' , 'aws_cloud');
define('AWS_CLOUD_DETAILS_TABLE' , 'cloud_aws_cloud_details');
define('AWS_CLOUD_AMAZON_INSTANCE_NAME' , 'Amazon');
define('AWS_CLOUD_OPENSTACK_INSTANCE_NAME' , 'OpenStack');
define('AWS_CLOUD_EUCALYPTUS_INSTANCE_NAME', 'Eucalyptus');
define('AWS_CLOUD_CLOUDN_INSTANCE_NAME' , 'Cloud n');
define('AWS_CLOUD_LIST_PAGE' , 'admin/config/clouds');
define('AWS_CLOUD_ADD_PAGE' , 'admin/config/clouds/add');
define('AWS_CLOUD_MODULE_NAME' , 'aws_cloud');
define('AWS_CLOUD_OPENSTACK_NOVA_CONTEXT' , 'openstack_nova');
define('AWS_CLOUD_CLOUDN_CONTEXT' , 'cloudn');
// AWS Constants
define('AWS_CLOUD_CLOUD_PREFIX', 'cloud_');
......@@ -44,6 +48,5 @@ define('AWS_CLOUD_API_VERSION', '2012-06-01');
define('AWS_CLOUD_HOST_URI', 'ec2.amazonaws.com');
define('AWS_CLOUD_IMAGE_UPLOAD_URL', 'https://s3.amazonaws.com');
define('AWS_CLOUD_IMAGE_REGISTER_URL', 'https://ec2.amazonaws.com');
define('AWS_CLOUD_OPENSTACK_NOVA_CONTEXT', 'openstack_nova');
define('AWS_CLOUD_PAGER_LIMIT', 50);
define('AWS_CLOUD_TIME_LIMIT', 1000);
......@@ -442,25 +442,34 @@ function _aws_cloud_download_describe_instances($cloud_context) {
$count = 0;
foreach ($obj_response->reservationSet->item as $item) {
foreach ($item->instancesSet->item as $instance) {
$tmp_nickname = cloud_check_in_array($id_nick_arr, $instance->instanceId);
$dns_name = $instance->dnsName;
$dns_from_cloud[] = $instance->dnsName;
$tmp_nickname = cloud_check_in_array($id_nick_arr, $instance->instanceId);
$keyname = $instance->keyName;
$sg_str = '';
$keyname = $instance->keyName;
$sg_str = '';
foreach ($item->groupSet->item as $grp_item) {
$sg_str = $sg_str . $grp_item->groupId . ',';
}
$sg_str = substr( $sg_str, 0, -1 );
$base_cloud = cloud_get_base_cloud($cloud_context);
switch ($base_cloud) { // Needed for OpenStack
case AWS_CLOUD_OPENSTACK_NOVA_CONTEXT:
switch ($base_cloud) {
case AWS_CLOUD_OPENSTACK_NOVA_CONTEXT: // Needed for OpenStack
if ($pos = strripos( $keyname, '(' )) {
$keyname = substr( $keyname, 0, $pos - 1 );
}
break;
case AWS_CLOUD_CLOUDN_CONTEXT: // Needed for OpenStack
$dns_name = isset($instance->privateIpAddress)
? $instance->privateIpAddress
: $instance->dnsName;
break;
}
$insert_query
......@@ -473,7 +482,7 @@ function _aws_cloud_download_describe_instances($cloud_context) {
'instance_state_code' => $instance->instanceState->code,
'instance_state_name' => $instance->instanceState->name,
'private_dns_name' => $instance->privateDnsName,
'dns_name' => $instance->dnsName,
'dns_name' => $dns_name,
'reason' => isset( $instance->reason ) ? $instance->reason : '',
'key_name' => $keyname,
'ami_launch_index' => $instance->amiLaunchIndex,
......@@ -481,7 +490,7 @@ function _aws_cloud_download_describe_instances($cloud_context) {
'instance_type' => $instance->instanceType,
'launch_time' => $instance->launchTime,
'placement' => isset( $instance->placement->availabilityZone )
? $instance->placement->availabilityZone : '',
? $instance->placement->availabilityZone : '',
'kernel_id' => isset( $instance->kernelId ) ? $instance->kernelId : '',
'ramdisk_id' => isset( $instance->ramdiskId ) ? $instance->ramdiskId : '',
'platform' => isset( $instance->platform ) ? $instance->platform : '',
......
......@@ -148,7 +148,7 @@ function aws_cloud_sdk_run_instances($cloud_context, $image_id, $min_count, $max
if ($ramdisk_id != AWS_CLOUD_CLOUD_NONE) {
$opt['RamdiskId'] = $ramdisk_id;
}
$response = $ec2->run_instances($image_id, $min_count, $max_count, $opt);
return aws_cloud_sdk_check_response($response, 'Launching Instance');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment