From 2b9b2d64c5be98405aaaf98db58f06b35b8af983 Mon Sep 17 00:00:00 2001 From: spisarski Date: Wed, 9 Aug 2017 14:17:26 -0600 Subject: 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 --- snaps/domain/stack.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'snaps/domain/stack.py') 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 -- cgit 1.2.3-korg