Skip to content

Commit f511620

Browse files
committed
Make end-user modules accessible from top level
There are several modules that end-users are expected to be using--connection, profile, exceptions, and utils--which could be made slightly more accessible by having them available in the top level `openstack` namespace. This change proposes importing `from openstack import <x>` in openstack.__init__.py so that end-users can do `import openstack` and then work from there. Nothing more than the typical end-user entry points are to be exposed from there, so if you need to get the server resource you still need to do `from openstack.compute.v2 import server`. Additionally, we should continue documenting and using in tests everything in the `from openstack import <x>` format ourselves as this is merely a convenience. Change-Id: I24a7ce3636b18287fcb2246fbdfa9f8b6767f323
1 parent 3b54b04 commit f511620

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

openstack/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# 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+
13+
from openstack import connection # NOQA
14+
from openstack import exceptions # NOQA
15+
from openstack import profile # NOQA
16+
from openstack import utils # NOQA

0 commit comments

Comments
 (0)