Skip to content

Commit 1281a09

Browse files
author
Clark Perkins
committed
For some reason the delete_blueprint method got missed earlier
1 parent dc9a713 commit 1281a09

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

stackdio/client/blueprint.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def create_blueprint(self, blueprint, provider="ec2"):
2020
host["zone"] = self.get_zone_id(host["zone"], provider)
2121

2222
if isinstance(host["cloud_profile"], basestring):
23-
host["cloud_profile"] = self.get_profile_id(host["cloud_profile"])
23+
host["cloud_profile"] = self.get_profile_id(host["cloud_profile"], title=True)
2424

2525
for component in host["formula_components"]:
2626
if isinstance(component["id"], (tuple, list)):
@@ -47,6 +47,10 @@ def search_blueprints(self, **kwargs):
4747
"""Return info for a specific blueprint_id"""
4848
return self._get(endpoint, params=kwargs, jsonify=True)['results']
4949

50+
@endpoint("blueprints/{blueprint_id}")
51+
def delete_blueprint(self, blueprint_id):
52+
return self._delete(endpoint, jsonify=True)
53+
5054
@deprecated
5155
@accepted_versions("<0.7")
5256
def get_blueprint_id(self, title):

stackdio/client/http.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ def _request(self, verb, url, quiet=False,
108108
if none_on_404 and result.status_code == 404:
109109
return None
110110

111+
elif result.status_code == 204:
112+
return None
113+
111114
elif raise_for_status:
112115
try:
113116
result.raise_for_status()

0 commit comments

Comments
 (0)