blob: c67c3d55264a705e50a8c8482c3a9c4a0287ca7a [file] [log] [blame]
Dennis Dmitriev010f4cd2016-11-01 20:43:51 +02001# Copyright 2016 Mirantis, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030015from tcp_tests.managers.execute_commands import ExecuteCommandsMixin
16
17
18class OpenstackManager(ExecuteCommandsMixin):
Dennis Dmitriev010f4cd2016-11-01 20:43:51 +020019 """docstring for OpenstackManager"""
20
Dmitry Tyzhnenkobc0f8262017-04-28 15:39:26 +030021 __config = None
22 __underlay = None
Dennis Dmitriev010f4cd2016-11-01 20:43:51 +020023
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030024 def __init__(self, config, underlay, salt):
Dmitry Tyzhnenkobc0f8262017-04-28 15:39:26 +030025 self.__config = config
26 self.__underlay = underlay
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030027 self._salt = salt
Dmitry Tyzhnenkobc0f8262017-04-28 15:39:26 +030028 super(OpenstackManager, self).__init__(
29 config=config, underlay=underlay)
Dennis Dmitriev010f4cd2016-11-01 20:43:51 +020030
31 def install(self, commands):
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030032 self.execute_commands(commands,
33 label='Install OpenStack services')
vrovachev700a7b02017-05-23 18:36:48 +040034 self.__config.openstack.openstack_installed = True