Implement CloudFormation's physical_resource_id for Data Pipeline
This commit is contained in:
parent
8623483c0f
commit
dafddb094b
@ -30,6 +30,10 @@ class Pipeline(object):
|
|||||||
self.objects = []
|
self.objects = []
|
||||||
self.status = "PENDING"
|
self.status = "PENDING"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def physical_resource_id(self):
|
||||||
|
return self.pipeline_id
|
||||||
|
|
||||||
def to_meta_json(self):
|
def to_meta_json(self):
|
||||||
return {
|
return {
|
||||||
"id": self.pipeline_id,
|
"id": self.pipeline_id,
|
||||||
|
@ -1462,7 +1462,7 @@ def test_datapipeline():
|
|||||||
}
|
}
|
||||||
cf_conn = boto.cloudformation.connect_to_region("us-east-1")
|
cf_conn = boto.cloudformation.connect_to_region("us-east-1")
|
||||||
template_json = json.dumps(dp_template)
|
template_json = json.dumps(dp_template)
|
||||||
cf_conn.create_stack(
|
stack_id = cf_conn.create_stack(
|
||||||
"test_stack",
|
"test_stack",
|
||||||
template_body=template_json,
|
template_body=template_json,
|
||||||
)
|
)
|
||||||
@ -1472,3 +1472,7 @@ def test_datapipeline():
|
|||||||
|
|
||||||
data_pipelines['pipelineIdList'].should.have.length_of(1)
|
data_pipelines['pipelineIdList'].should.have.length_of(1)
|
||||||
data_pipelines['pipelineIdList'][0]['name'].should.equal('testDataPipeline')
|
data_pipelines['pipelineIdList'][0]['name'].should.equal('testDataPipeline')
|
||||||
|
|
||||||
|
stack_resources = cf_conn.list_stack_resources(stack_id)
|
||||||
|
stack_resources.should.have.length_of(1)
|
||||||
|
stack_resources[0].physical_resource_id.should.equal(data_pipelines['pipelineIdList'][0]['id'])
|
||||||
|
Loading…
Reference in New Issue
Block a user