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