revert remaining step and playbooks
diff --git a/xos/openstack_observer/steps/sync_controller_site_privileges.py b/xos/openstack_observer/steps/sync_controller_site_privileges.py
index 3c0012b..d257536 100644
--- a/xos/openstack_observer/steps/sync_controller_site_privileges.py
+++ b/xos/openstack_observer/steps/sync_controller_site_privileges.py
@@ -59,7 +59,7 @@
# "ok" string received per operation. If we get as many oks as
# the number of operations we issued, that means a grand success.
# Otherwise, the number of oks tell us which operation failed.
- controller_site_privilege.role_id = res[1]['id']
+ controller_site_privilege.role_id = res[0]['id']
controller_site_privilege.save()
def delete_record(self, controller_site_privilege):
diff --git a/xos/openstack_observer/steps/sync_controller_sites.py b/xos/openstack_observer/steps/sync_controller_sites.py
index 10142a1..614d435 100644
--- a/xos/openstack_observer/steps/sync_controller_sites.py
+++ b/xos/openstack_observer/steps/sync_controller_sites.py
@@ -32,7 +32,7 @@
return tenant_fields
def map_sync_outputs(self, controller_site, res):
- controller_site.tenant_id = res[1]['id']
+ controller_site.tenant_id = res[0]['id']
controller_site.backend_status = '1 - OK'
controller_site.save()
diff --git a/xos/openstack_observer/steps/sync_controller_sites.yaml b/xos/openstack_observer/steps/sync_controller_sites.yaml
index c6ff4b7..4129802 100644
--- a/xos/openstack_observer/steps/sync_controller_sites.yaml
+++ b/xos/openstack_observer/steps/sync_controller_sites.yaml
@@ -2,7 +2,4 @@
- hosts: 127.0.0.1
connection: local
tasks:
- - shell: ENDPOINT={{endpoint_v3}} USERNAME={{admin_user}} PASSWORD={{admin_password}} TENANT={{admin_tenant}} DOMAIN={{domain}} /opt/xos/openstack/get_token.sh
- register: token
-
- keystone_user: endpoint={{ endpoint }} login_user={{ admin_user }} login_password={{ admin_password }} login_tenant_name={{ admin_tenant }} tenant={{ tenant }} tenant_description="{{ tenant_description }}"
diff --git a/xos/openstack_observer/steps/sync_controller_slices.py b/xos/openstack_observer/steps/sync_controller_slices.py
index b1098c5..9904aef 100644
--- a/xos/openstack_observer/steps/sync_controller_slices.py
+++ b/xos/openstack_observer/steps/sync_controller_slices.py
@@ -50,7 +50,7 @@
return tenant_fields
def map_sync_outputs(self, controller_slice, res):
- tenant_id = res[1]['id']
+ tenant_id = res[0]['id']
if (not controller_slice.tenant_id):
try:
driver = OpenStackDriver().admin_driver(controller=controller_slice.controller)
diff --git a/xos/openstack_observer/steps/sync_controller_slices.yaml b/xos/openstack_observer/steps/sync_controller_slices.yaml
index c006738..61470ce 100644
--- a/xos/openstack_observer/steps/sync_controller_slices.yaml
+++ b/xos/openstack_observer/steps/sync_controller_slices.yaml
@@ -2,13 +2,11 @@
- hosts: 127.0.0.1
connection: local
tasks:
- - shell: ENDPOINT={{endpoint_v3}} USERNAME={{admin_user}} PASSWORD={{admin_password}} TENANT={{admin_tenant}} DOMAIN={{domain}} /opt/xos/openstack/get_token.sh
- register: token
{% if delete -%}
- - keystone_user: endpoint={{ endpoint }} token={{ '{{' }} token.stdout {{ '}}' }} tenant={{ tenant }} tenant_description="{{ tenant_description }}" state=absent
+ - keystone_user: endpoint={{ endpoint }} login_user={{ admin_user }} login_password={{ admin_password }} login_tenant_name={{ admin_tenant }} tenant={{ tenant }} tenant_description="{{ tenant_description }}" state=absent
{% else -%}
- - keystone_user: endpoint={{ endpoint }} token={{ '{{' }} token.stdout {{ '}}' }} tenant={{ tenant }} tenant_description="{{ tenant_description }}"
+ - keystone_user: endpoint={{ endpoint }} login_user={{ admin_user }} login_password={{ admin_password }} login_tenant_name={{ admin_tenant }} tenant={{ tenant }} tenant_description="{{ tenant_description }}"
{% for role in roles %}
- - keystone_user: endpoint={{ endpoint }} token={{ '{{' }} token.stdout {{ '}}' }} user="{{ name }}" role={{ role }} tenant={{ tenant }}
+ - keystone_user: endpoint={{ endpoint }} login_user={{ admin_user }} login_password={{ admin_password }} login_tenant_name={{ admin_tenant }} user="{{ name }}" role={{ role }} tenant={{ tenant }}
{% endfor %}
{% endif %}
diff --git a/xos/openstack_observer/steps/sync_controller_users.py b/xos/openstack_observer/steps/sync_controller_users.py
index a993c83..4062453 100644
--- a/xos/openstack_observer/steps/sync_controller_users.py
+++ b/xos/openstack_observer/steps/sync_controller_users.py
@@ -59,7 +59,7 @@
return user_fields
def map_sync_outputs(self, controller_user, res):
- controller_user.kuser_id = res[1]['id']
+ controller_user.kuser_id = res[0]['id']
controller_user.backend_status = '1 - OK'
controller_user.save()
diff --git a/xos/openstack_observer/steps/sync_controller_users.yaml b/xos/openstack_observer/steps/sync_controller_users.yaml
index 1179f52..4f2db5e 100644
--- a/xos/openstack_observer/steps/sync_controller_users.yaml
+++ b/xos/openstack_observer/steps/sync_controller_users.yaml
@@ -2,16 +2,15 @@
- hosts: 127.0.0.1
connection: local
tasks:
- - shell: ENDPOINT={{endpoint_v3}} USERNAME={{admin_user}} PASSWORD={{admin_password}} TENANT={{admin_tenant}} DOMAIN={{domain}} /opt/xos/openstack/get_token.sh
- register: token
-
- keystone_user:
endpoint={{ endpoint }}
- token={{ '{{' }} token.stdout {{ '}}' }}
+ login_user={{ admin_user }}
+ login_password={{ admin_password }}
+ login_tenant_name={{ admin_tenant }}
user="{{ name }}"
email={{ email }}
password={{ password }}
tenant={{ tenant }}
{% for role in roles %}
- - keystone_user: endpoint={{ endpoint}} token={{ '{{' }} token.stdout {{ '}}' }} user="{{ name }}" role={{ role }} tenant={{ tenant }}
+ - keystone_user: endpoint={{ endpoint}} login_user={{ admin_user }} login_password={{ admin_password }} login_tenant_name={{ admin_tenant }} user="{{ name }}" role={{ role }} tenant={{ tenant }}
{% endfor %}