observer steps get v3 token using domain auth and use token at v2 api endpoints
diff --git a/xos/openstack_observer/steps/sync_controller_images.py b/xos/openstack_observer/steps/sync_controller_images.py
index 948fcea..527ad49 100644
--- a/xos/openstack_observer/steps/sync_controller_images.py
+++ b/xos/openstack_observer/steps/sync_controller_images.py
@@ -31,8 +31,10 @@
                 raise InnocuousException('Controller %s is disabled'%controller_image.controller.name)
 
         image_fields = {'endpoint':controller_image.controller.auth_url,
+                        'endpoint_v3': controller_image.controller.auth_url_v3,
                         'admin_user':controller_image.controller.admin_user,
                         'admin_password':controller_image.controller.admin_password,
+                        'domain': controller_image.controller.domain,
                         'name':controller_image.image.name,
                         'filepath':controller_image.image.path,
                         'ansible_tag': '%s@%s'%(controller_image.image.name,controller_image.controller.name), # name of ansible playbook
diff --git a/xos/openstack_observer/steps/sync_controller_images.yaml b/xos/openstack_observer/steps/sync_controller_images.yaml
index 18228db..328090b 100644
--- a/xos/openstack_observer/steps/sync_controller_images.yaml
+++ b/xos/openstack_observer/steps/sync_controller_images.yaml
@@ -2,11 +2,12 @@
 - hosts: 127.0.0.1
   connection: local 
   tasks:
+  - shell: ENDPOINT={{endpoint_v3}} USERNAME={{admin_user}} PASSWORD={{admin_password}} TENANT=admin DOMAIN={{domain}} openstack/get_token.sh
+    register: token
+
   - glance_image:
         auth_url: {{ endpoint }} 
-        login_username: {{ admin_user }}
-        login_tenant_name: 'admin'
-        login_password: {{ admin_password }}
+        token: {{ token.stdout }}
         name: "{{ name }}"
         file: "{{ filepath }}"
         disk_format: 'raw'
diff --git a/xos/openstack_observer/steps/sync_controller_networks.py b/xos/openstack_observer/steps/sync_controller_networks.py
index 54f2466..9983d88 100644
--- a/xos/openstack_observer/steps/sync_controller_networks.py
+++ b/xos/openstack_observer/steps/sync_controller_networks.py
@@ -40,9 +40,11 @@
         slice = controller_network.network.owner
 
         network_fields = {'endpoint':controller_network.controller.auth_url,
+                    'endpoint_v3': controller_network.controller.auth_url_v3,
                     'admin_user':slice.creator.email,
                     'tenant_name':slice.name,
                     'admin_password':slice.creator.remote_password,
+                    'domain': congroller_network.controller.domain,
                     'name':network_name,
                     'subnet_name':subnet_name,
                     'ansible_tag':'%s-%s@%s'%(network_name,slice.slicename,controller_network.controller.name),
diff --git a/xos/openstack_observer/steps/sync_controller_networks.yaml b/xos/openstack_observer/steps/sync_controller_networks.yaml
index 6b18fda..2bf2b4a 100644
--- a/xos/openstack_observer/steps/sync_controller_networks.yaml
+++ b/xos/openstack_observer/steps/sync_controller_networks.yaml
@@ -2,12 +2,13 @@
 - hosts: 127.0.0.1
   connection: local 
   tasks:
+  - shell: ENDPOINT={{endpoint_v3}} USERNAME={{admin_user}} PASSWORD={{admin_password}} TENANT={{tenant_name}} DOMAIN={{domain}} openstack/get_token.sh
+    register: token
+
   - quantum_network:
-        auth_url={{ endpoint }} 
-        login_username={{ admin_user }}
+        auth_url={{ endpoint }}
+        token={{ token.stdout }} 
         tenant_name={{ tenant_name }}
-        login_tenant_name={{ tenant_name }}
-        login_password={{ admin_password }}
         name={{ name }}
         {% if delete %}
         state=absent
@@ -17,11 +18,9 @@
         shared=true
   {% if not delete %}
   - quantum_subnet:
-        auth_url={{ endpoint }} 
-        login_username={{ admin_user }}
+        auth_url={{ endpoint }}
+        token={{ token.stdout }} 
         tenant_name={{ tenant_name }}
-        login_tenant_name={{ tenant_name }}
-        login_password={{ admin_password }}
         name={{ subnet_name }} 
         network_name={{ name }} 
         {% if delete %}
diff --git a/xos/openstack_observer/steps/sync_controller_site_privileges.py b/xos/openstack_observer/steps/sync_controller_site_privileges.py
index a2c40ef..f66607b 100644
--- a/xos/openstack_observer/steps/sync_controller_site_privileges.py
+++ b/xos/openstack_observer/steps/sync_controller_site_privileges.py
@@ -52,13 +52,15 @@
             #    tenant_id = ctrl_site_deployments[0].tenant_id  
             #    tenant_name = ctrl_site_deployments[0].site_deployment.site.login_base
             user_fields = {
-                       'endpoint':controller_site_privilege.controller.auth_url,
+               'endpoint':controller_site_privilege.controller.auth_url,
+               'endpoint_v3': controller_site_privilege.controller.auth_url_v3,
+               'domain': controller_site_privilege.controller.domain,
 		       'name': controller_site_privilege.site_privilege.user.email,
-                       'email': controller_site_privilege.site_privilege.user.email,
-                       'password': controller_site_privilege.site_privilege.user.remote_password,
-                       'admin_user': controller_site_privilege.controller.admin_user,
+               'email': controller_site_privilege.site_privilege.user.email,
+               'password': controller_site_privilege.site_privilege.user.remote_password,
+               'admin_user': controller_site_privilege.controller.admin_user,
 		       'admin_password': controller_site_privilege.controller.admin_password,
-	               'ansible_tag':'%s@%s'%(controller_site_privilege.site_privilege.user.email.replace('@','-at-'),controller_site_privilege.controller.name),
+	           'ansible_tag':'%s@%s'%(controller_site_privilege.site_privilege.user.email.replace('@','-at-'),controller_site_privilege.controller.name),
 		       'admin_tenant': controller_site_privilege.controller.admin_tenant,
 		       'roles':roles,
 		       'tenant':controller_site_privilege.site_privilege.site.login_base}    
diff --git a/xos/openstack_observer/steps/sync_controller_sites.py b/xos/openstack_observer/steps/sync_controller_sites.py
index 670f09c..ce64f2f 100644
--- a/xos/openstack_observer/steps/sync_controller_sites.py
+++ b/xos/openstack_observer/steps/sync_controller_sites.py
@@ -25,10 +25,12 @@
 
 	template = os_template_env.get_template('sync_controller_sites.yaml')
 	tenant_fields = {'endpoint':controller_site.controller.auth_url,
+                 'endpoint_v3': controller_site.controller.auth_url_v3,
+                 'domain': controller_site.controller.domain,
 		         'admin_user': controller_site.controller.admin_user,
 		         'admin_password': controller_site.controller.admin_password,
 		         'admin_tenant': controller_site.controller.admin_tenant,
-	                 'ansible_tag': '%s@%s'%(controller_site.site.login_base,controller_site.controller.name), # name of ansible playbook
+	             'ansible_tag': '%s@%s'%(controller_site.site.login_base,controller_site.controller.name), # name of ansible playbook
 		         'tenant': controller_site.site.login_base,
 		         'tenant_description': controller_site.site.name}
 
diff --git a/xos/openstack_observer/steps/sync_controller_slice_privileges.py b/xos/openstack_observer/steps/sync_controller_slice_privileges.py
index 2e2e63c..744bb38 100644
--- a/xos/openstack_observer/steps/sync_controller_slice_privileges.py
+++ b/xos/openstack_observer/steps/sync_controller_slice_privileges.py
@@ -51,13 +51,15 @@
             #    tenant_id = ctrl_slice_deployments[0].tenant_id  
             #    tenant_name = ctrl_slice_deployments[0].slice_deployment.slice.login_base
             user_fields = {
-                       'endpoint':controller_slice_privilege.controller.auth_url,
+               'endpoint':controller_slice_privilege.controller.auth_url,
+               'endpoint_v3': controller_slice_privilege.controller.auth_url_v3,
+               'domain': controller_slice_privilege.controller.domain,
 		       'name': controller_slice_privilege.slice_privilege.user.email,
-                       'email': controller_slice_privilege.slice_privilege.user.email,
-                       'password': controller_slice_privilege.slice_privilege.user.remote_password,
-                       'admin_user': controller_slice_privilege.controller.admin_user,
+               'email': controller_slice_privilege.slice_privilege.user.email,
+               'password': controller_slice_privilege.slice_privilege.user.remote_password,
+               'admin_user': controller_slice_privilege.controller.admin_user,
 		       'admin_password': controller_slice_privilege.controller.admin_password,
-                       'ansible_tag':'%s@%s@%s'%(controller_slice_privilege.slice_privilege.user.email.replace('@','-at-'),controller_slice_privilege.slice_privilege.slice.name,controller_slice_privilege.controller.name),
+               'ansible_tag':'%s@%s@%s'%(controller_slice_privilege.slice_privilege.user.email.replace('@','-at-'),controller_slice_privilege.slice_privilege.slice.name,controller_slice_privilege.controller.name),
 		       'admin_tenant': controller_slice_privilege.controller.admin_tenant,
 		       'roles':roles,
 		       'tenant':controller_slice_privilege.slice_privilege.slice.name}    
diff --git a/xos/openstack_observer/steps/sync_controller_slices.py b/xos/openstack_observer/steps/sync_controller_slices.py
index c456a2f..5ab9603 100644
--- a/xos/openstack_observer/steps/sync_controller_slices.py
+++ b/xos/openstack_observer/steps/sync_controller_slices.py
@@ -44,6 +44,8 @@
 
         max_instances=int(controller_slice.slice.max_instances)
         tenant_fields = {'endpoint':controller_slice.controller.auth_url,
+                         'endpoint_v3': controller_slice.controller.auth_url_v3,
+                         'domain': controller_slice.controller.domain,
                          'admin_user': controller_slice.controller.admin_user,
                          'admin_password': controller_slice.controller.admin_password,
                          'admin_tenant': 'admin',
diff --git a/xos/openstack_observer/steps/sync_controller_slices.yaml b/xos/openstack_observer/steps/sync_controller_slices.yaml
index 28c406d..7151e09 100644
--- a/xos/openstack_observer/steps/sync_controller_slices.yaml
+++ b/xos/openstack_observer/steps/sync_controller_slices.yaml
@@ -2,11 +2,13 @@
 - hosts: 127.0.0.1
   connection: local
   tasks:
+  - shell: ENDPOINT={{endpoint_v3}} USERNAME={{admin_user}} PASSWORD={{admin_password}} TENANT={{admin_tenant}} DOMAIN={{domain}} openstack/get_token.sh
+    register: token
   {% if delete -%}
-  - 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
+  - keystone_user: endpoint={{ endpoint }} token={{ token.stdout }}  tenant={{ tenant }} tenant_description="{{ tenant_description }}" state=absent
   {% else -%}	
-  - keystone_user: endpoint={{ endpoint }} login_user={{ admin_user }} login_password={{ admin_password }} login_tenant_name={{ admin_tenant }} tenant={{ tenant }} tenant_description="{{ tenant_description }}"
+  - keystone_user: endpoint={{ endpoint }} token={{ token.stdout }} tenant={{ tenant }} tenant_description="{{ tenant_description }}"
   {% for role in roles %}
-  - keystone_user: endpoint={{ endpoint}} login_user={{ admin_user }} login_password={{ admin_password }} login_tenant_name={{ admin_tenant }} user="{{ name }}" role={{ role }} tenant={{ tenant }}
+  - keystone_user: endpoint={{ endpoint}} token={{ token.stdout }} 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 d30d0ff..505ba87 100644
--- a/xos/openstack_observer/steps/sync_controller_users.py
+++ b/xos/openstack_observer/steps/sync_controller_users.py
@@ -58,6 +58,8 @@
             #    tenant_name = ctrl_site_deployments[0].site_deployment.site.login_base
             user_fields = {
                 'endpoint':controller_user.controller.auth_url,
+                'endpoint_v3': controller_user.controller.auth_url_v3,
+                'domain': controller_user.controller.domain,
                 'name': controller_user.user.email,
                 'email': controller_user.user.email,
                 'password': controller_user.user.remote_password,
diff --git a/xos/openstack_observer/steps/sync_controller_users.yaml b/xos/openstack_observer/steps/sync_controller_users.yaml
index 95cdba3..7814ee6 100644
--- a/xos/openstack_observer/steps/sync_controller_users.yaml
+++ b/xos/openstack_observer/steps/sync_controller_users.yaml
@@ -2,15 +2,16 @@
 - hosts: 127.0.0.1
   connection: local
   tasks:
+  - shell: ENDPOINT={{endpoint_v3}} USERNAME={{admin_user}} PASSWORD={{admin_password}} TENANT={{admin_tenant}} DOMAIN={{domain}} openstack/get_token.sh
+    register: token
+
   - keystone_user: 
-       endpoint={{ endpoint }} 
+       endpoint= {{ endpoint }} 
+       token= {{ token.stdout }}
        user="{{ name }}" 
        email={{ email }} 
        password={{ password }} 
-       login_user={{ admin_user }} 
-       login_password={{ admin_password }} 
-       login_tenant_name={{ admin_tenant }} 
        tenant={{ tenant }}
   {% for role in roles %}
-  - keystone_user: endpoint={{ endpoint}} login_user={{ admin_user }} login_password={{ admin_password }} login_tenant_name={{ admin_tenant }} user="{{ name }}" role={{ role }} tenant={{ tenant }}
+  - keystone_user: endpoint= {{ endpoint}} token= {{ token.stdout }} user="{{ name }}" role={{ role }} tenant={{ tenant }}
   {% endfor %}
diff --git a/xos/openstack_observer/steps/sync_instances.py b/xos/openstack_observer/steps/sync_instances.py
index 3f61d35..402e9a0 100644
--- a/xos/openstack_observer/steps/sync_instances.py
+++ b/xos/openstack_observer/steps/sync_instances.py
@@ -135,6 +135,8 @@
 
         controller = instance.node.site_deployment.controller
         tenant_fields = {'endpoint':controller.auth_url,
+                     'endpoint_v3': controller.auth_url_v3,
+                     'domain': controller.domain,
                      'admin_user': instance.creator.email,
                      'admin_password': instance.creator.remote_password,
                      'admin_tenant': instance.slice.name,
diff --git a/xos/openstack_observer/steps/sync_slivers.yaml b/xos/openstack_observer/steps/sync_slivers.yaml
index 803a294..f42f601 100644
--- a/xos/openstack_observer/steps/sync_slivers.yaml
+++ b/xos/openstack_observer/steps/sync_slivers.yaml
@@ -2,11 +2,12 @@
 - hosts: 127.0.0.1
   connection: local
   tasks:
+  - shell: ENDPOINT={{endpoint_v3}} USERNAME={{admin_user}} PASSWORD={{admin_password}} TENANT=admin DOMAIN={{domain}} openstack/get_token.sh
+    register: token
+
   - nova_compute:
       auth_url: {{ endpoint }}
-      login_username: {{ admin_user }}
-      login_password: {{ admin_password }}
-      login_tenant_name: {{ admin_tenant }}
+      token: {{ token.stdout }}
       name: {{ name }}
       {% if delete -%}
       state: absent