X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fapi%2Fopenstack%2Fopenstack_dummies%2Fkeystone_dummy_api.py;h=7abf9c4a1ae2eeca28eb517a42455c95db11aff2;hb=4e37abbc1a06ffa40ed11c7c6a16c1fe95403161;hp=26987f00e13fd1c76b51584cc173bf5594fea7a2;hpb=569836b037b36326272570ee54e19536791d8a07;p=osm%2Fvim-emu.git diff --git a/src/emuvim/api/openstack/openstack_dummies/keystone_dummy_api.py b/src/emuvim/api/openstack/openstack_dummies/keystone_dummy_api.py index 26987f0..7abf9c4 100755 --- a/src/emuvim/api/openstack/openstack_dummies/keystone_dummy_api.py +++ b/src/emuvim/api/openstack/openstack_dummies/keystone_dummy_api.py @@ -4,6 +4,8 @@ from emuvim.api.openstack.openstack_dummies.base_openstack_dummy import BaseOpen import logging import json +LOG = logging.getLogger("api.openstack.keystone") + class KeystoneDummyApi(BaseOpenstackDummy): def __init__(self, in_ip, in_port): @@ -17,7 +19,7 @@ class KeystoneDummyApi(BaseOpenstackDummy): self.api.add_resource(KeystoneGetTokenv3, "/v3/auth/tokens", resource_class_kwargs={'api': self}) def _start_flask(self): - logging.info("Starting %s endpoint @ http://%s:%d" % (__name__, self.ip, self.port)) + LOG.info("Starting %s endpoint @ http://%s:%d" % (__name__, self.ip, self.port)) if self.app is not None: self.app.before_request(self.dump_playbook) self.app.run(self.ip, self.port, debug=True, use_reloader=False) @@ -29,7 +31,7 @@ class Shutdown(Resource): """ def get(self): - logging.debug(("%s is beeing shut down") % (__name__)) + LOG.debug(("%s is beeing shut down") % (__name__)) func = request.environ.get('werkzeug.server.shutdown') if func is None: raise RuntimeError('Not running with the Werkzeug Server') @@ -52,7 +54,7 @@ class KeystoneListVersions(Resource): :return: Returns the api versions. :rtype: :class:`flask.response` containing a static json encoded dict. """ - logging.debug("API CALL: %s GET" % str(self.__class__.__name__)) + LOG.debug("API CALL: %s GET" % str(self.__class__.__name__)) resp = dict() resp['versions'] = dict() @@ -94,7 +96,7 @@ class KeystoneShowAPIv2(Resource): :return: Returns an openstack style response for all entrypoints. :rtype: :class:`flask.response` """ - logging.debug("API CALL: %s GET" % str(self.__class__.__name__)) + LOG.debug("API CALL: %s GET" % str(self.__class__.__name__)) neutron_port = self.api.port + 4696 heat_port = self.api.port + 3004 @@ -156,7 +158,7 @@ class KeystoneShowAPIv3(Resource): :return: Returns an openstack style response for all entrypoints. :rtype: :class:`flask.response` """ - logging.debug("API CALL: %s GET" % str(self.__class__.__name__)) + LOG.debug("API CALL: %s GET" % str(self.__class__.__name__)) neutron_port = self.api.port + 4696 heat_port = self.api.port + 3004 @@ -228,7 +230,7 @@ class KeystoneGetToken(Resource): :rtype: :class:`flask.response` """ - logging.debug("API CALL: %s POST" % str(self.__class__.__name__)) + LOG.debug("API CALL: %s POST" % str(self.__class__.__name__)) try: ret = dict() req = json.loads(request.data) @@ -371,7 +373,7 @@ class KeystoneGetTokenv3(Resource): :rtype: :class:`flask.response` """ - logging.debug("API CALL: %s POST" % str(self.__class__.__name__)) + LOG.debug("API CALL: %s POST" % str(self.__class__.__name__)) try: ret = dict() req = json.loads(request.data)