if "auth_name" in test or "auth_password" in test or "auth_url" in test:
username = None
password = None
+ tenant = None
host = None
port = None
description = ""
username = test["auth_name"]
if "auth_password" in test:
password = test["auth_password"]
+ if "auth_tenant" in test:
+ tenant = test["auth_tenant"]
if "auth_host" in test:
host = test["auth_host"]
if "auth_port" in test:
port = test["auth_port"]
if "description" in test:
description = test["description"]
- self.app.auth_keystone(username, password, host, port)
+ self.app.auth_keystone(username, password, host, port, tenant)
title = "Change auth to "
if username:
title += username
"authz": [
{
"auth_name": "admin",
+ "auth_password": "password",
+ "auth_tenant": "admin",
"description": "Change user to admin (just in case...)"
},
{
"name": "nova image-list",
"external_command": "nova image-list",
- "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros-0.3.4-x86_64-uec",
+ "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros-0.3",
"description": "Get an Image ID"
},
+ {
+ "name": "create teannt test",
+ "external_command": "openstack project create test_moonclient",
+ "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros-0.3",
+ "description": "Get an Image ID"
+ },
+ {
+ "name": "add role admin to demo",
+ "external_command": "openstack role add --project admin --user demo admin",
+ "result": "",
+ "description": "Force the admin role for the user demo on the project admin (for testing purpose)."
+ },
{
"name": "nova boot new server",
- "external_command": "nova boot --flavor m1.micro --image $uuid_image test_moonclient",
+ "external_command": "nova boot --flavor m1.tiny --image $uuid_image test_moonclient",
"result": "\\| OS-EXT-STS\\:vm_state\\s+\\| building",
"description": "Boot a new nova server."
},
},
{
"name": "add_subject",
- "command": "subject add demo --subject_pass nomoresecrete",
+ "command": "subject add demo --subject_pass password",
"result": "",
"description": "",
"command_options": ""
},
{
"name": "add_subject",
- "command": "subject add demo --subject_pass nomoresecrete",
+ "command": "subject add demo --subject_pass password",
"result": "",
"description": "Add demo subject.",
"command_options": ""
},
{
"name": "add_subject",
- "command": "subject add demo --subject_pass nomoresecrete",
+ "command": "subject add demo --subject_pass password",
"result": "",
"description": "Add demo subject.",
"command_options": ""
{
"name": "demo: check nova command",
- "external_command": "nova --os-user-name demo list",
+ "external_command": "nova --os-user-name demo --os-project-name admin list",
"result": "test_moonclient",
- "description": "Check demo cant list nova servers due to the current rules"
+ "description": "Check demo can list nova servers due to the current rules"
},
{
"name": "demo: try to pause nova instance",
- "external_command": "nova --os-username demo pause $uuid_server",
+ "external_command": "nova --os-username demo --os-project-name admin pause $uuid_server",
"result": "^$",
"description": "Pausing the server must be impossible due to the current rules"
},
{
"name": "check nova command",
- "external_command": "nova --os-user-name demo list",
+ "external_command": "nova --os-user-name demo --os-project-name admin list",
"result": "\\| (?P<uuid_server>[\\w\\-]+)\\s+\\| test_moonclient\\s+\\| ACTIVE\\s+\\| [\\w\\-]+\\s+\\| Running",
"description": "Check that nova server is still in running state."
},
+ {
+ "name": "pause",
+ "external_command": "read",
+ "result": "",
+ "description": "Pause"
+ },
{
"name": "list tenant",
{
"auth_name": "demo",
+ "auth_password": "password",
+ "auth_tenant": "admin",
"description": "Change user to demo"
},
{
"auth_name": "admin",
+ "auth_tenant": "admin",
"description": "Change user to admin"
},