blob: 8ea591c65c212a6ed7e61a24995635bd34580f90 [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
26
27aggregate_add_host = aggregates.add_host
28aggregate_create = aggregates.create
29aggregate_delete = aggregates.delete
30aggregate_get = aggregates.get
31aggregate_list = aggregates.list_
32aggregate_remove_host = aggregates.remove_host
33aggregate_set_metadata = aggregates.set_metadata
34flavor_add_extra_specs = flavors.add_extra_specs
35flavor_create = flavors.create
36flavor_delete = flavors.delete
37flavor_delete_extra_spec = flavors.delete_extra_spec
38flavor_get = flavors.get
39flavor_get_extra_specs = flavors.get_extra_specs
40flavor_list = flavors.list_
41keypair_create = keypairs.create
42keypair_delete = keypairs.delete
43keypair_get = keypairs.get
44keypair_list = keypairs.list_
45quota_delete = quotas.delete
46quota_list = quotas.list_
47quota_update = quotas.update
48server_create = servers.create
49server_delete = servers.delete
50server_get = servers.get
51server_list = servers.list_
52server_lock = servers.lock
53server_resume = servers.resume
54server_suspend = servers.suspend
55server_unlock = servers.unlock
56
57
58__all__ = (
59 'aggregate_add_host', 'aggregate_create', 'aggregate_delete',
60 'aggregate_get', 'aggregate_list', 'aggregate_remove_host',
61 'aggregate_set_metadata', 'flavor_add_extra_specs', 'flavor_create',
62 'flavor_delete', 'flavor_delete_extra_spec', 'flavor_get',
63 'flavor_get_extra_specs', 'flavor_list', 'keypair_create',
64 'keypair_delete', 'keypair_get', 'keypair_list', 'quota_delete',
65 'quota_list', 'quota_update', 'server_create', 'server_delete',
66 'server_get', 'server_list', 'server_lock', 'server_resume',
67 'server_suspend', 'server_unlock')
68
69
70def __virtual__():
71 if REQUIREMENTS_MET:
72 return __virtualname__
73 else:
74 return False, ("The novav21 execution module cannot be loaded: "
75 "os_client_config package not found.")