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
This commit is contained in:
Brian Curtin 2016-07-22 13:21:06 -04:00
parent 3b54b0440e
commit f51162070c

View File

@ -0,0 +1,16 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from openstack import connection # NOQA
from openstack import exceptions # NOQA
from openstack import profile # NOQA
from openstack import utils # NOQA