aboutsummaryrefslogtreecommitdiffstats
path: root/python_moonclient/python_moonclient
diff options
context:
space:
mode:
authorRHE <rebirthmonkey@gmail.com>2017-12-28 15:19:05 +0100
committerRHE <rebirthmonkey@gmail.com>2017-12-28 15:19:05 +0100
commitb7cf76d39eab9d292b8d58db4b0934557cad4509 (patch)
tree556b0e617b5921ad3779b7aed3b669bb475331c6 /python_moonclient/python_moonclient
parent9cf58823b4fa426816acfef81a562054d26afde8 (diff)
moonv4.3 review
Change-Id: I0d137df21136292b58194def44ac5b32183368fc Signed-off-by: RHE <rebirthmonkey@gmail.com>
Diffstat (limited to 'python_moonclient/python_moonclient')
-rw-r--r--python_moonclient/python_moonclient/authz.py4
-rw-r--r--python_moonclient/python_moonclient/parse.py2
-rw-r--r--python_moonclient/python_moonclient/pdp.py5
-rw-r--r--python_moonclient/python_moonclient/policies.py4
-rw-r--r--python_moonclient/python_moonclient/scripts.py2
5 files changed, 7 insertions, 10 deletions
diff --git a/python_moonclient/python_moonclient/authz.py b/python_moonclient/python_moonclient/authz.py
index 9458767e..b90bf00f 100644
--- a/python_moonclient/python_moonclient/authz.py
+++ b/python_moonclient/python_moonclient/authz.py
@@ -13,7 +13,7 @@ HOST_KEYSTONE = None
PORT_KEYSTONE = None
lock = threading.Lock()
-logger = logging.getLogger(__name__)
+logger = logging.getLogger("moonclient.authz")
def _construct_payload(creds, current_rule, enforcer, target):
@@ -122,7 +122,7 @@ def send_requests(scenario, authz_host, authz_port, keystone_project_id, request
while request_cpt < limit:
rule = (random.choice(SUBJECTS), random.choice(OBJECTS), random.choice(ACTIONS))
if destination.lower() == "wrapper":
- url = "http://{}:{}/authz".format(authz_host, authz_port)
+ url = "http://{}:{}/authz/oslo".format(authz_host, authz_port)
data = {
'target': {
"user_id": random.choice(SUBJECTS),
diff --git a/python_moonclient/python_moonclient/parse.py b/python_moonclient/python_moonclient/parse.py
index 8960c41c..d31b3ebd 100644
--- a/python_moonclient/python_moonclient/parse.py
+++ b/python_moonclient/python_moonclient/parse.py
@@ -2,7 +2,7 @@ import logging
import argparse
-logger = logging.getLogger("python_moonclient.utils.parse")
+logger = logging.getLogger("python_moonclient.parse")
def parse():
diff --git a/python_moonclient/python_moonclient/pdp.py b/python_moonclient/python_moonclient/pdp.py
index e628fe17..6841a276 100644
--- a/python_moonclient/python_moonclient/pdp.py
+++ b/python_moonclient/python_moonclient/pdp.py
@@ -3,7 +3,8 @@ import logging
import requests
from python_moonclient import config
-logger = logging.getLogger("python_moonclient.utils.pdp")
+logger = logging.getLogger("python_moonclient.pdp")
+
URL = None
HEADERS = None
KEYSTONE_USER = None
@@ -11,8 +12,6 @@ KEYSTONE_PASSWORD = None
KEYSTONE_PROJECT = None
KEYSTONE_SERVER = None
-# config = utils.config.get_config_data()
-
pdp_template = {
"name": "test_pdp",
diff --git a/python_moonclient/python_moonclient/policies.py b/python_moonclient/python_moonclient/policies.py
index 80210811..0fae63c2 100644
--- a/python_moonclient/python_moonclient/policies.py
+++ b/python_moonclient/python_moonclient/policies.py
@@ -2,12 +2,10 @@ import logging
import requests
from . import config, models
-logger = logging.getLogger("moonclient.models")
+logger = logging.getLogger("moonclient.policies")
URL = None
HEADERS = None
-FILE = open("/tmp/test.log", "w")
-logger = logging.getLogger("utils.policies")
policy_template = {
"name": "test_policy",
diff --git a/python_moonclient/python_moonclient/scripts.py b/python_moonclient/python_moonclient/scripts.py
index 30759743..c880e497 100644
--- a/python_moonclient/python_moonclient/scripts.py
+++ b/python_moonclient/python_moonclient/scripts.py
@@ -3,7 +3,7 @@ from importlib.machinery import SourceFileLoader
from . import parse, models, policies, pdp, authz
-logger = logging.getLogger("python_moonclient.scripts")
+logger = logging.getLogger("moonclient.scripts")
def get_keystone_projects():