blob: bb567c07982ba6094e76168ac18dadd28fe445f5 [file] [log] [blame]
Vladyslav Drokcb8d0fb2018-06-27 19:28:14 +03001# Licensed under the Apache License, Version 2.0 (the "License"); you may
2# not use this file except in compliance with the License. You may obtain
3# a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10# License for the specific language governing permissions and limitations
11# under the License.
12
13try:
14 import os_client_config
15 REQUIREMENTS_MET = True
16except ImportError:
17 REQUIREMENTS_MET = False
18
19__virtualname__ = 'novav21'
20
21import aggregates
22import flavors
23import keypairs
24import quotas
25import servers
Oleh Hryhorov5cfb9d32018-09-11 16:55:24 +000026import services
Vladyslav Drokcb8d0fb2018-06-27 19:28:14 +030027
28aggregate_add_host = aggregates.add_host
29aggregate_create = aggregates.create
30aggregate_delete = aggregates.delete
31aggregate_get = aggregates.get
32aggregate_list = aggregates.list_
33aggregate_remove_host = aggregates.remove_host
34aggregate_set_metadata = aggregates.set_metadata
35flavor_add_extra_specs = flavors.add_extra_specs
36flavor_create = flavors.create
37flavor_delete = flavors.delete
38flavor_delete_extra_spec = flavors.delete_extra_spec
39flavor_get = flavors.get
40flavor_get_extra_specs = flavors.get_extra_specs
41flavor_list = flavors.list_
42keypair_create = keypairs.create
43keypair_delete = keypairs.delete
44keypair_get = keypairs.get
45keypair_list = keypairs.list_
46quota_delete = quotas.delete
47quota_list = quotas.list_
48quota_update = quotas.update
49server_create = servers.create
50server_delete = servers.delete
51server_get = servers.get
52server_list = servers.list_
53server_lock = servers.lock
54server_resume = servers.resume
55server_suspend = servers.suspend
56server_unlock = servers.unlock
Oleh Hryhorov5cfb9d32018-09-11 16:55:24 +000057services_list = services.list_
58services_update = services.update
59services_wait = services.wait_for_services
Vladyslav Drokcb8d0fb2018-06-27 19:28:14 +030060
61
62__all__ = (
63 'aggregate_add_host', 'aggregate_create', 'aggregate_delete',
64 'aggregate_get', 'aggregate_list', 'aggregate_remove_host',
65 'aggregate_set_metadata', 'flavor_add_extra_specs', 'flavor_create',
66 'flavor_delete', 'flavor_delete_extra_spec', 'flavor_get',
67 'flavor_get_extra_specs', 'flavor_list', 'keypair_create',
68 'keypair_delete', 'keypair_get', 'keypair_list', 'quota_delete',
69 'quota_list', 'quota_update', 'server_create', 'server_delete',
70 'server_get', 'server_list', 'server_lock', 'server_resume',
Oleh Hryhorov5cfb9d32018-09-11 16:55:24 +000071 'server_suspend', 'server_unlock', 'services_list', 'services_update',
72 'services_wait')
Vladyslav Drokcb8d0fb2018-06-27 19:28:14 +030073
74
75def __virtual__():
76 if REQUIREMENTS_MET:
77 return __virtualname__
78 else:
79 return False, ("The novav21 execution module cannot be loaded: "
80 "os_client_config package not found.")