description = ""
                     if "auth_name" in test:
                         username = test["auth_name"]
+                        os.environ["OS_USERNAME"] = test["auth_name"]
                     if "auth_password" in test:
                         password = test["auth_password"]
+                        os.environ["OS_PASSWORD"] = test["auth_password"]
                     if "auth_tenant" in test:
                         tenant = test["auth_tenant"]
+                        os.environ["OS_TENANT_NAME"] = test["auth_tenant"]
                     if "auth_host" in test:
                         host = test["auth_host"]
                     if "auth_port" in test:
                     data.append(data_tmp)
                     continue
                 data_tmp = list()
-                tmp_filename = os.path.join("/tmp", uuid4().hex)
+                tmp_filename = os.path.join("/tmp", "moon_{}.tmp".format(uuid4().hex))
                 tmp_filename_fd = open(tmp_filename, "w")
                 self.log.debug("test={}".format(test))
                 if "command" not in test:
                     self.app.stdout = stdout_back
                     result_str = open(tmp_filename, "r").read()
                     self.logfile.write("{}".format(result_str))
+                os.unlink(tmp_filename)
                 data_tmp.append(group_name)
                 data_tmp.append(test["name"])
                 if "result" in test:
 
         "description": "Change user to admin (just in case...)"
       },
 
+      {
+        "name": "get cirros image",
+        "external_command": "wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img -o /tmp/cirros.img",
+        "result": "",
+        "description": "Download a Cirros image"
+      },
+      {
+        "name": "install cirros image",
+        "external_command": "glance image-create --name \"cirros\"  --disk-format qcow2 --file /tmp/cirros.img --container-format bare",
+        "result": "",
+        "description": "Upload the Cirros image in glance"
+      },
       {
         "name": "nova image-list",
         "external_command": "nova image-list",
-        "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros-0.3",
+        "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros",
         "description": "Get an Image ID"
       },
       {
-        "name": "create teannt test",
+        "name": "create tenant test",
         "external_command": "openstack project create test_moonclient",
-        "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros-0.3",
+        "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros",
         "description": "Get an Image ID"
       },
       {
       {
         "name": "neutron net-list",
         "external_command": "neutron net-list",
-        "result": "(?P<uuid_net>[\\w-]+)\\s+\\| public",
+        "result": "(?P<uuid_net>[\\w-]+)\\s+\\| ext-net",
         "description": "Get an Net ID"
       },
       {
 
         "description": "Change user to admin (just in case...)"
       },
 
+      {
+        "name": "get cirros image",
+        "external_command": "wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img -o /tmp/cirros.img",
+        "result": "",
+        "description": "Download a Cirros image"
+      },
+      {
+        "name": "install cirros image",
+        "external_command": "glance image-create --name \"cirros\"  --disk-format qcow2 --file /tmp/cirros.img --container-format bare",
+        "result": "",
+        "description": "Upload the Cirros image in glance"
+      },
       {
         "name": "nova image-list",
         "external_command": "nova image-list",
-        "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros-0.*",
+        "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros",
         "description": "Get an Image ID"
       },
       {
         "name": "neutron net-list",
         "external_command": "neutron net-list",
-        "result": "(?P<uuid_net>[\\w-]+)\\s+\\| public",
+        "result": "(?P<uuid_net>[\\w-]+)\\s+\\| ext-net",
         "description": "Get an Net ID"
       },
       {
         "name": "nova boot new server",
         "external_command": "nova boot  --flavor m1.tiny --image $uuid_image --nic net-id=$uuid_net test_moonclient",
-        "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros-0.",
+        "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros",
         "description": "Get an Image ID"
       },
       {
 
       {
         "name": "list tenant",
         "command": "tenant list",
-        "no_result": "demo",
+        "no_result": "admin",
         "description": "Check if tenant demo is used."
       },
       {
-        "name": "add tenant demo",
-        "command": "tenant add demo",
+        "name": "add tenant admin",
+        "command": "tenant add admin",
         "result": "^$",
         "description": "Add a new tenant",
         "command_options": ""
       },
       {
-        "name": "check tenant demo",
+        "name": "check tenant admin",
         "command": "tenant list",
-        "result": "(?P<uuid>\\w+)\\s+demo",
+        "result": "(?P<uuid>\\w+)\\s+admin",
         "description": "Check that tenant demo has been correctly added"
       },
       {
       {
         "name": "list tenant",
         "command": "tenant list",
-        "result": "demo",
-        "description": "Check if tenant demo is used."
+        "result": "admin",
+        "description": "Check if tenant admin is used."
       },
       {
         "name": "select_authz_ie",
       {
         "name": "list tenant",
         "command": "tenant list",
-        "result": "demo",
-        "description": "Check if tenant demo is used."
+        "result": "admin",
+        "description": "Check if tenant admin is used."
       },
 
       {
         "name": "delete_tenant",
         "command": "tenant delete $uuid",
         "result": "",
-        "description": "Delete the tenant demo",
+        "description": "Delete the tenant admin",
         "command_options": ""
       },
       {
 
         "command_options": "-c id -c name -f value"
       },
 
+      {
+        "name": "get cirros image",
+        "external_command": "wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img -o /tmp/cirros.img",
+        "result": "",
+        "description": "Download a Cirros image"
+      },
+      {
+        "name": "install cirros image",
+        "external_command": "glance image-create --name \"cirros\"  --disk-format qcow2 --file /tmp/cirros.img --container-format bare",
+        "result": "",
+        "description": "Upload the Cirros image in glance"
+      },
       {
         "name": "nova image-list",
         "external_command": "nova image-list",
-        "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros-0.",
+        "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros",
         "description": "Get an Image ID"
       },
       {
         "name": "neutron net-list",
         "external_command": "neutron net-list",
-        "result": "(?P<uuid_net>[\\w-]+)\\s+\\| public",
+        "result": "(?P<uuid_net>[\\w-]+)\\s+\\| ext-net",
         "description": "Get an Net ID"
       },
       {
         "name": "nova boot new server",
         "external_command": "nova boot  --flavor m1.tiny --image $uuid_image --nic net-id=$uuid_net test_moonclient",
-        "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros-0.",
+        "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros",
         "description": "Get an Image ID"
       },
       {
 
 import time
 import yaml
 
+
+PORT_ODL = 8181
+HOST_ODL = "localhost"
+
 parser = argparse.ArgumentParser()
 
 parser.add_argument("-r", "--report",
 
 def test_federation():
     # Retrieve Moon token
-    url = urlopen('http://localhost:8080/moon/token',
+    url = urlopen('http://{host}:{port}/moon/token'.format(host=HOST_ODL, port=PORT_ODL),
                   data='grant_type=password&username=admin&password=console'.encode('utf-8'))
     code = url.getcode()
     if code not in (200, 201, 202, 204):
-        return False, "Not able to retrieve Moon token."
+        return False, "Not able to retrieve Moon token (error code: {}).".format(code)
 
     # Retrieve ODL token
     auth_handler = HTTPBasicAuthHandler()
     auth_handler.add_password(realm='Moon',
-                              uri='http://localhost:8080/auth/v1/domains',
+                              uri='http://{host}:{port}/auth/v1/domains'.format(host=HOST_ODL, port=PORT_ODL),
                               user='admin',
                               passwd='console')
     opener = build_opener(auth_handler)
     install_opener(opener)
-    url = urlopen('http://www.example.com/login.html')
+    url = urlopen('http://{host}:{port}/auth/v1/domains'.format(host=HOST_ODL, port=PORT_ODL))
     code = url.getcode()
     if code not in (200, 201, 202, 204):
-        return False, "Not able to retrieve ODL token."
+        return False, "Not able to retrieve ODL token (error code: {}).".format(code)
     return True, ""
 
 
 def test_moon_openstack():
     cmd = "moon test --password console --self"
 
-    ret_val = functest_utils.execute_command(cmd, logger, exit_on_error=False)
+    ret_val = functest_utils.execute_command(cmd, logger)
 
     return ret_val
 
         'timestart': start_time,
         'duration': duration,
         'status': test_status,
+        'results': {
+            'openstack': result_os,
+            'opendaylight': result_odl
+        }
     }
 
     functest_utils.logger_test_results(logger, "moon",