2 Copyright (c) 2017 SONATA-NFV and Paderborn University
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
17 Neither the name of the SONATA-NFV, Paderborn University
18 nor the names of its contributors may be used to endorse or promote
19 products derived from this software without specific prior written
22 This work has been performed in the framework of the SONATA project,
23 funded by the European Commission under Grant number 671517 through
24 the Horizon 2020 and 5G-PPP programmes. The authors would like to
25 acknowledge the contributions of their colleagues of the SONATA
26 partner consortium (www.sonata-nfv.eu).
32 def __init__(self
, id=None):
37 self
.stack_name
= None
38 self
.creation_time
= None
39 self
.update_time
= None
43 self
.id = str(uuid
.uuid4())
47 def add_server(self
, server
):
49 Adds one server to the server dictionary.
51 :param server: The server to add.
52 :type server: :class:`heat.resources.server`
54 self
.servers
[server
.name
] = server
56 def add_net(self
, net
):
58 Adds one network to the network dictionary.
60 :param net: Network to add.
61 :type net: :class:`heat.resources.net`
63 self
.nets
[net
.name
] = net
65 def add_port(self
, port
):
67 Adds one port to the port dictionary.
69 :param port: Port to add.
70 :type port: :class:`heat.resources.port`
72 self
.ports
[port
.name
] = port
74 def add_router(self
, router
):
76 Adds one router to the port dictionary.
78 :param router: Router to add.
79 :type router: :class:`heat.resources.router`
81 self
.routers
[router
.name
] = router