Move task_manager and adapter up a level from cloud
They've been integrated with the rest of things. Move them to better indicate that. Also, delete some dead code that was noticed while updating the docs. Change-Id: Ie92c3d74edc08d62aa2bd55da689a400740bab6e
This commit is contained in:
parent
c469caedc7
commit
c2de39de8b
|
@ -63,7 +63,7 @@ Returned Resources
|
|||
------------------
|
||||
|
||||
Complex objects returned to the caller must be a `munch.Munch` type. The
|
||||
`openstack.cloud._adapter.Adapter` class makes resources into `munch.Munch`.
|
||||
`openstack._adapter.ShadeAdapter` class makes resources into `munch.Munch`.
|
||||
|
||||
All objects should be normalized. It is shade's purpose in life to make
|
||||
OpenStack consistent for end users, and this means not trusting the clouds
|
||||
|
|
|
@ -44,7 +44,7 @@ There are additional sub-loggers that are used at times, primarily so that a
|
|||
user can decide to turn on or off a specific type of logging. They are listed
|
||||
below.
|
||||
|
||||
openstack.cloud.task_manager
|
||||
openstack.task_manager
|
||||
`openstack.cloud` uses a Task Manager to perform remote calls. The
|
||||
`openstack.cloud.task_manager` logger emits messages at the start and end
|
||||
of each Task announcing what it is going to run and then what it ran and
|
||||
|
@ -52,12 +52,6 @@ openstack.cloud.task_manager
|
|||
get a trace of external actions `openstack.cloud` is taking without full
|
||||
`HTTP Tracing`_.
|
||||
|
||||
openstack.cloud.request_ids
|
||||
The `openstack.cloud.request_ids` logger emits a log line at the end of each
|
||||
HTTP interaction with the OpenStack Request ID associated with the
|
||||
interaction. This can be be useful for tracking action taken on the
|
||||
server-side if one does not want `HTTP Tracing`_.
|
||||
|
||||
openstack.cloud.exc
|
||||
If `log_inner_exceptions` is set to True, `shade` will emit any wrapped
|
||||
exception to the `openstack.cloud.exc` logger. Wrapped exceptions are usually
|
||||
|
|
|
@ -19,8 +19,8 @@ from six.moves import urllib
|
|||
|
||||
from keystoneauth1 import adapter
|
||||
|
||||
from openstack.cloud import task_manager as _task_manager
|
||||
from openstack import exceptions
|
||||
from openstack import task_manager as _task_manager
|
||||
|
||||
|
||||
def _extract_name(url):
|
|
@ -14,7 +14,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from openstack.cloud import task_manager
|
||||
from openstack import task_manager
|
||||
|
||||
|
||||
class MachineCreate(task_manager.Task):
|
||||
|
|
|
@ -486,25 +486,6 @@ def get_hostvars_from_server(cloud, server, mounts=None):
|
|||
return server_vars
|
||||
|
||||
|
||||
def _log_request_id(obj, request_id):
|
||||
if request_id:
|
||||
# Log the request id and object id in a specific logger. This way
|
||||
# someone can turn it on if they're interested in this kind of tracing.
|
||||
log = _log.setup_logging('openstack.cloud.request_ids')
|
||||
obj_id = None
|
||||
if isinstance(obj, dict):
|
||||
obj_id = obj.get('id', obj.get('uuid'))
|
||||
if obj_id:
|
||||
log.debug("Retrieved object %(id)s. Request ID %(request_id)s",
|
||||
{'id': obj.get('id', obj.get('uuid')),
|
||||
'request_id': request_id})
|
||||
else:
|
||||
log.debug("Retrieved a response. Request ID %(request_id)s",
|
||||
{'request_id': request_id})
|
||||
|
||||
return obj
|
||||
|
||||
|
||||
def obj_to_munch(obj):
|
||||
""" Turn an object with attributes into a dict suitable for serializing.
|
||||
|
||||
|
|
|
@ -35,15 +35,15 @@ from six.moves import urllib
|
|||
import keystoneauth1.exceptions
|
||||
|
||||
import openstack
|
||||
from openstack import _adapter
|
||||
from openstack import _log
|
||||
from openstack.cloud.exc import * # noqa
|
||||
from openstack.cloud import _adapter
|
||||
from openstack.cloud._heat import event_utils
|
||||
from openstack.cloud._heat import template_utils
|
||||
from openstack.cloud import _normalize
|
||||
from openstack.cloud import meta
|
||||
from openstack.cloud import task_manager
|
||||
from openstack.cloud import _utils
|
||||
from openstack import task_manager
|
||||
|
||||
# TODO(shade) shade keys were x-object-meta-x-sdk-md5 - we need to add those
|
||||
# to freshness checks so that a shade->sdk transition doens't
|
||||
|
|
|
@ -79,12 +79,12 @@ import sys
|
|||
import keystoneauth1.exceptions
|
||||
import os_service_types
|
||||
|
||||
from openstack.cloud import task_manager
|
||||
import openstack.config
|
||||
from openstack.config import cloud_config
|
||||
from openstack import exceptions
|
||||
from openstack import proxy
|
||||
from openstack import proxy2
|
||||
from openstack import task_manager
|
||||
from openstack import utils
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# 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.cloud import _adapter
|
||||
from openstack import _adapter
|
||||
from openstack import exceptions
|
||||
from openstack import resource
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from openstack.cloud import _adapter
|
||||
from openstack import _adapter
|
||||
from openstack import exceptions
|
||||
from openstack import resource2
|
||||
from openstack import utils
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
import concurrent.futures
|
||||
import mock
|
||||
|
||||
from openstack.cloud import task_manager
|
||||
from openstack import task_manager
|
||||
from openstack.tests.unit import base
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
from testscenarios import load_tests_apply_scenarios as load_tests # noqa
|
||||
|
||||
from openstack.cloud import _adapter
|
||||
from openstack import _adapter
|
||||
from openstack.tests.unit import base
|
||||
|
||||
|
Loading…
Reference in New Issue