r99443 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99442‎ | r99443 | r99444 >
Date:22:57, 10 October 2011
Author:reedy
Status:deferred
Tags:
Comment:
aws-sdk 1.4.3
Modified paths:
  • /trunk/extensions/OpenStackManager/aws-sdk/_docs/CHANGELOG.md (modified) (history)
  • /trunk/extensions/OpenStackManager/aws-sdk/sdk.class.php (modified) (history)
  • /trunk/extensions/OpenStackManager/aws-sdk/services/cloudformation.class.php (modified) (history)
  • /trunk/extensions/OpenStackManager/aws-sdk/services/s3.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenStackManager/aws-sdk/services/cloudformation.class.php
@@ -48,7 +48,7 @@
4949 * Amazon CloudFormation makes use of other AWS products. If you need additional technical information about a specific AWS product, you can
5050 * find the product's technical documentation at <a href="http://aws.amazon.com/documentation/">http://aws.amazon.com/documentation/</a>.
5151 *
52 - * @version Thu Sep 01 21:17:41 PDT 2011
 52+ * @version Fri Sep 30 16:15:37 PDT 2011
5353 * @license See the included NOTICE.md file for complete information.
5454 * @copyright See the included NOTICE.md file for complete information.
5555 * @link http://aws.amazon.com/cloudformation/Amazon CloudFormation
@@ -183,7 +183,7 @@
184184 * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
185185 * <li><code>TemplateBody</code> - <code>string</code> - Optional - Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.) Condition: You must pass <code>TemplateBody</code> or <code>TemplateURL</code>. If both are passed, only <code>TemplateBody</code> is used. </li>
186186 * <li><code>TemplateURL</code> - <code>string</code> - Optional - Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. For more information, go to the AWS CloudFormation User Guide. Conditional: You must pass <code>TemplateURL</code> or <code>TemplateBody</code>. If both are passed, only <code>TemplateBody</code> is used. </li>
187 - * <li><code>Parameters</code> - <code>array</code> - Optional - A list of <code>Parameter</code> structures. <ul>
 187+ * <li><code>Parameters</code> - <code>array</code> - Optional - A list of <code>Parameter</code> structures that specify input parameters for the stack. <ul>
188188 * <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
189189 * <li><code>ParameterKey</code> - <code>string</code> - Optional - The key associated with the parameter. </li>
190190 * <li><code>ParameterValue</code> - <code>string</code> - Optional - The value associated with the parameter. </li>
@@ -192,6 +192,7 @@
193193 * <li><code>DisableRollback</code> - <code>boolean</code> - Optional - Boolean to enable or disable rollback on stack creation failures.<br></br> Default: <code>false</code> </li>
194194 * <li><code>TimeoutInMinutes</code> - <code>integer</code> - Optional - The amount of time that can pass before the stack status becomes CREATE_FAILED; if <code>DisableRollback</code> is not set or is set to <code>false</code>, the stack will be rolled back. </li>
195195 * <li><code>NotificationARNs</code> - <code>string|array</code> - Optional - The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI). Pass a string for a single value, or an indexed array for multiple values. </li>
 196+ * <li><code>Capabilities</code> - <code>array</code>- Optional - The list of capabilities that you want to allow in the stack. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.</li>
196197 * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
197198 * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
198199 * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
@@ -219,6 +220,15 @@
220221 unset($opt['NotificationARNs']);
221222 }
222223
 224+ // Optional parameter
 225+ if (isset($opt['Capabilities']))
 226+ {
 227+ $opt = array_merge($opt, CFComplexType::map(array(
 228+ 'Capabilities' => $opt['Capabilities']
 229+ ), 'member'));
 230+ unset($opt['Capabilities']);
 231+ }
 232+
223233 return $this->authenticate('CreateStack', $opt, $this->hostname);
224234 }
225235
@@ -394,6 +404,51 @@
395405
396406 return $this->authenticate('DescribeStackResources', $opt, $this->hostname);
397407 }
 408+
 409+ /**
 410+ * Updates a stack as specified in the template. After the call completes successfully, the stack update starts. You can check the status of
 411+ * the stack via the DescribeStacks action.
 412+ *
 413+ * To get a copy of the template for an existing stack, you can use the GetTemplate action.
 414+ *
 415+ * For more information about creating an update template, updating a stack, and monitoring the progress of the update, see <a
 416+ * href="http://docs.amazonwebservices.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html">Updating a Stack</a>.
 417+ *
 418+ * @param string $stack_name (Required) The name or stack ID of the stack to update. Must contain only alphanumeric characters (case sensitive) and start with an alpha character. Maximum length of the name is 255 characters.
 419+ * @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
 420+ * <li><code>TemplateBody</code> - <code>string</code> - Optional - Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.) Condition: You must pass <code>TemplateBody</code> or <code>TemplateURL</code>. If both are passed, only <code>TemplateBody</code> is used. </li>
 421+ * <li><code>TemplateURL</code> - <code>string</code> - Optional - Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. For more information, go to the AWS CloudFormation User Guide. Conditional: You must pass <code>TemplateURL</code> or <code>TemplateBody</code>. If both are passed, only <code>TemplateBody</code> is used. </li>
 422+ * <li><code>Parameters</code> - <code>array</code> - Optional - A list of <code>Parameter</code> structures that specify input parameters for the stack.</li>
 423+ * <li><code>Capabilities</code> - <code>array</code>- Optional - The list of capabilities that you want to allow in the stack. If your stack contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.</li>
 424+ * <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
 425+ * <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
 426+ * @return CFResponse A <CFResponse> object containing a parsed HTTP response.
 427+ */
 428+ public function update_stack($stack_name, $opt = null)
 429+ {
 430+ if (!$opt) $opt = array();
 431+ $opt['StackName'] = $stack_name;
 432+
 433+ // Optional parameter
 434+ if (isset($opt['Parameters']))
 435+ {
 436+ $opt = array_merge($opt, CFComplexType::map(array(
 437+ 'Parameters' => $opt['Parameters']
 438+ ), 'member'));
 439+ unset($opt['Parameters']);
 440+ }
 441+
 442+ // Optional parameter
 443+ if (isset($opt['Capabilities']))
 444+ {
 445+ $opt = array_merge($opt, CFComplexType::map(array(
 446+ 'Capabilities' => $opt['Capabilities']
 447+ ), 'member'));
 448+ unset($opt['Capabilities']);
 449+ }
 450+
 451+ return $this->authenticate('UpdateStack', $opt, $this->hostname);
 452+ }
398453 }
399454
400455
Index: trunk/extensions/OpenStackManager/aws-sdk/services/s3.class.php
@@ -287,7 +287,7 @@
288288 return parent::session_based_auth($key, $secret_key, $token);
289289 }
290290
291 - return parent::__construct($key, $secret_key);
 291+ return parent::__construct($key, $secret_key, $token);
292292 }
293293
294294
Index: trunk/extensions/OpenStackManager/aws-sdk/_docs/CHANGELOG.md
@@ -1,3 +1,18 @@
 2+# Changelog: 1.4.3 "Ultros"
 3+<http://finalfantasy.wikia.com/wiki/Ultros>
 4+
 5+Launched Friday, September 30, 2011
 6+
 7+## Service Classes
 8+### AmazonCloudFormation
 9+* **New:** Support for new features in CloudFormation have been added to the SDK.
 10+
 11+### AmazonS3
 12+* **Fixed:** Setting the default cache configuration no longer causes authentication errors in `AmazonS3`.
 13+
 14+
 15+----
 16+
217 # Changelog: 1.4.2.1 "Tiamat, Part II"
318 <http://finalfantasy.wikia.com/wiki/Tiamat>
419
Index: trunk/extensions/OpenStackManager/aws-sdk/sdk.class.php
@@ -125,9 +125,9 @@
126126 // INTERMEDIARY CONSTANTS
127127
128128 define('CFRUNTIME_NAME', 'aws-sdk-php');
129 -define('CFRUNTIME_VERSION', '1.4.2');
 129+define('CFRUNTIME_VERSION', '1.4.3');
130130 // define('CFRUNTIME_BUILD', gmdate('YmdHis', filemtime(__FILE__))); // @todo: Hardcode for release.
131 -define('CFRUNTIME_BUILD', '20110901191027');
 131+define('CFRUNTIME_BUILD', '20110930191027');
132132 define('CFRUNTIME_USERAGENT', CFRUNTIME_NAME . '/' . CFRUNTIME_VERSION . ' PHP/' . PHP_VERSION . ' ' . str_replace(' ', '_', php_uname('s')) . '/' . str_replace(' ', '_', php_uname('r')) . ' Arch/' . php_uname('m') . ' SAPI/' . php_sapi_name() . ' Integer/' . PHP_INT_MAX . ' Build/' . CFRUNTIME_BUILD . __aws_sdk_ua_callback());
133133
134134
@@ -376,6 +376,7 @@
377377 // Set default values
378378 $this->key = null;
379379 $this->secret_key = null;
 380+ $this->auth_token = $token;
380381
381382 // If both a key and secret key are passed in, use those.
382383 if ($key && $secret_key)

Sign-offs

UserFlagDate
Nikerabbitinspected15:04, 11 October 2011

Status & tagging log