summaryrefslogtreecommitdiffstats
path: root/snaps/domain/stack.py
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-08-09 14:17:26 -0600
committerspisarski <s.pisarski@cablelabs.com>2017-08-09 14:37:41 -0600
commit2b9b2d64c5be98405aaaf98db58f06b35b8af983 (patch)
tree7eac6cb5a5182371b5602e53bb613234c5eff11c /snaps/domain/stack.py
parent430905e7f76e4a074167a49ca2bfbf727eebcefd (diff)
SNAPS Stack creators can now return SNAPS network creators.
As Heat Stacks are responsible for spawning objects in OpenStack, the class OpenStackHeatStack which is responsible for applying and managing the state of a stack now can retrieve OpenStackNetwork objects for the networks created in the stack for clients who would like to query the networks and subnets or update them outside of Heat. JIRA: SNAPS-171 Change-Id: I9bf0b81d4f7bfeb1b6392f345022c7d9a57d0415 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/domain/stack.py')
-rw-r--r--snaps/domain/stack.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/snaps/domain/stack.py b/snaps/domain/stack.py
index 0302184..df4d4e4 100644
--- a/snaps/domain/stack.py
+++ b/snaps/domain/stack.py
@@ -31,3 +31,17 @@ class Stack:
def __eq__(self, other):
return (self.name == other.name and
self.id == other.id)
+
+
+class Resource:
+ """
+ SNAPS domain object for resources created by a heat template
+ """
+ def __init__(self, resource_type, resource_id):
+ """
+ Constructor
+ :param resource_type: the type
+ :param resource_id: the ID attached to the resource of the given type
+ """
+ self.type = resource_type
+ self.id = resource_id