Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
usr
/
lib
/
python2.7
/
site-packages
/
awscli
/
customizations
/
cloudformation
/
File Content:
deployer.pyc
� =��Xc @ s� d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z e j e � Z e j d d d g � Z d e f d � � YZ d S( i����N( t exceptions( t datetimet ChangeSetResultt changeset_idt changeset_typet Deployerc B sJ e Z d d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( s% awscli-cloudformation-package-deploy-c C s | | _ | | _ d S( N( t _clientt changeset_prefix( t selft cloudformation_clientR ( ( sM /tmp/pip-build-uEGWVr/awscli/awscli/customizations/cloudformation/deployer.pyt __init__ s c C s� yO | j j d | � } t | d � d k r2 t S| d d } | d d k SWnm t j j k r� } t | � } d j | � | k r� t j d j | � � t St j d d | �| � n Xd S( s� Checks if a CloudFormation stack with given name exists :param stack_name: Name or ID of the stack :return: True if stack exists. False otherwise t StackNamet Stacksi i t StackStatust REVIEW_IN_PROGRESSs Stack with id {0} does not exists Unable to get stack details.t exc_infoN( R t describe_stackst lent Falset botocoreR t ClientErrort strt formatt LOGt debug( R t stack_namet respt stackt et msg( ( sM /tmp/pip-build-uEGWVr/awscli/awscli/customizations/cloudformation/deployer.pyt has_stack$ s c C s� t j � j � } d j | � } | j t t t j � � � } d } | j | � s^ d } n yN | j j d | d | d | d | d | d | d | � } t | d | � SWn, t k r� } t j d d | �| � n Xd S( s\ Call Cloudformation to create a changeset and wait for it to complete :param stack_name: Name or ID of stack :param cfn_template: CloudFormation template string :param parameter_values: Template parameters object :param capabilities: Array of capabilities passed to CloudFormation :return: s Created by AWS CLI at {0} UTCt UPDATEt CREATEt ChangeSetNameR t TemplateBodyt ChangeSetTypet Parameterst Capabilitiest Descriptiont Ids Unable to create changesetR N( R t utcnowt isoformatR R R t intt timeR R t create_change_setR t ExceptionR R ( R R t cfn_templatet parameter_valuest capabilitiest nowt descriptiont changeset_nameR R t ex( ( sM /tmp/pip-build-uEGWVr/awscli/awscli/customizations/cloudformation/deployer.pyt create_changesetH s&