Make v3 admin_password parameters consistent

There are API parameters "admin_password" and "admin_pass" on some APIs:
 * AdminPasswordController: admin_password
 * EvacuateController     : admin_password
 * RescueController       : admin_pass
 * ServersController      : admin_pass

These parameters mean the same thing, it is the admin password of a vm
instance. They should be the same parameter name because of the meaning.

DocImpact

Partially implements bp nova-v3-api

Change-Id: I452672e064d0dc4a1d5700bb96c01de8087f33d8
This commit is contained in:
Ken'ichi Ohmichi 2013-10-21 13:25:37 +09:00
parent f119908b26
commit c88b2de92b
126 changed files with 260 additions and 256 deletions

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "zPnp2GseTqG4",
"admin_password": "zPnp2GseTqG4",
"id": "8195065c-fea4-4d57-b93f-5c5c63fe90e8",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="72885505-d8fb-4078-8bdb-65222c08f4d1" admin_pass="V24sJmhzzKLu" os-disk-config:disk_config="AUTO" os-access-ips:access_ip_v4="" os-access-ips:access_ip_v6="">
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="72885505-d8fb-4078-8bdb-65222c08f4d1" admin_password="V24sJmhzzKLu" os-disk-config:disk_config="AUTO" os-access-ips:access_ip_v4="" os-access-ips:access_ip_v6="">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/72885505-d8fb-4078-8bdb-65222c08f4d1" rel="self"/>
<atom:link href="http://openstack.example.com/servers/72885505-d8fb-4078-8bdb-65222c08f4d1" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "C3r5xKS73Y7S",
"admin_password": "C3r5xKS73Y7S",
"id": "3f19c120-f64a-4faf-848e-33900b752f83",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="fe57373d-9410-4c24-bd03-7e9323c26718" admin_pass="VR3kG8JMfPhZ">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="fe57373d-9410-4c24-bd03-7e9323c26718" admin_password="VR3kG8JMfPhZ">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/fe57373d-9410-4c24-bd03-7e9323c26718" rel="self"/>
<atom:link href="http://openstack.example.com/servers/fe57373d-9410-4c24-bd03-7e9323c26718" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "DM3QzjhGTzLB",
"admin_password": "DM3QzjhGTzLB",
"id": "bebeec79-497e-4711-a311-d0d2e3dfc73b",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="aabf9643-db79-4dbf-b8ea-9158bda2c11f" admin_pass="EpkvFp93fHBv">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="aabf9643-db79-4dbf-b8ea-9158bda2c11f" admin_password="EpkvFp93fHBv">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/aabf9643-db79-4dbf-b8ea-9158bda2c11f" rel="self"/>
<atom:link href="http://openstack.example.com/servers/aabf9643-db79-4dbf-b8ea-9158bda2c11f" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "oCYTjD2KnRtB",
"admin_password": "oCYTjD2KnRtB",
"id": "aa3130b9-dffc-417b-aa03-93d5394a2fa6",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="f52e5ef8-4fd6-4ea3-9c3a-aa6f2e42ebed" admin_pass="FqVqFjhYw3Pt">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="f52e5ef8-4fd6-4ea3-9c3a-aa6f2e42ebed" admin_password="FqVqFjhYw3Pt">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/f52e5ef8-4fd6-4ea3-9c3a-aa6f2e42ebed" rel="self"/>
<atom:link href="http://openstack.example.com/servers/f52e5ef8-4fd6-4ea3-9c3a-aa6f2e42ebed" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "fjPxt8d8YcSR",
"admin_password": "fjPxt8d8YcSR",
"id": "c937be78-c423-495b-a99a-e590ab6f30ba",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="df8ced02-6e8e-447f-817e-eed7b4546931" admin_pass="h2kBdURmTqv4">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="df8ced02-6e8e-447f-817e-eed7b4546931" admin_password="h2kBdURmTqv4">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/df8ced02-6e8e-447f-817e-eed7b4546931" rel="self"/>
<atom:link href="http://openstack.example.com/servers/df8ced02-6e8e-447f-817e-eed7b4546931" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "h2cx3Lm47BJc",
"admin_password": "h2cx3Lm47BJc",
"id": "f0318e69-11eb-4aed-9840-59b6c72beee8",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="1fa6f088-dece-466e-9fe4-7e01645852ba" admin_pass="tP75yVZEBiP2">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="1fa6f088-dece-466e-9fe4-7e01645852ba" admin_password="tP75yVZEBiP2">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/1fa6f088-dece-466e-9fe4-7e01645852ba" rel="self"/>
<atom:link href="http://openstack.example.com/servers/1fa6f088-dece-466e-9fe4-7e01645852ba" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "8mQaAgHHFsDp",
"admin_password": "8mQaAgHHFsDp",
"id": "71e8cf04-0486-46ae-9d18-e51f4978fa13",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="f815a87a-c0ca-4a43-82a2-903029253f4f" admin_pass="KWM7cBGWm9jT">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="f815a87a-c0ca-4a43-82a2-903029253f4f" admin_password="KWM7cBGWm9jT">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/f815a87a-c0ca-4a43-82a2-903029253f4f" rel="self"/>
<atom:link href="http://openstack.example.com/servers/f815a87a-c0ca-4a43-82a2-903029253f4f" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "hqgU8QzT54wF",
"admin_password": "hqgU8QzT54wF",
"id": "4a3bde9b-fa37-408d-b167-68e1724c923e",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="1259ad4e-7541-4079-9794-bf7cb8ec3579" admin_pass="JBxtVyh6ggbm">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="1259ad4e-7541-4079-9794-bf7cb8ec3579" admin_password="JBxtVyh6ggbm">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/1259ad4e-7541-4079-9794-bf7cb8ec3579" rel="self"/>
<atom:link href="http://openstack.example.com/servers/1259ad4e-7541-4079-9794-bf7cb8ec3579" rel="bookmark"/>
</server>
</server>

View File

@ -10,7 +10,7 @@
}
]
},
"admin_pass": "GfbpJWGgBZ8K",
"admin_password": "GfbpJWGgBZ8K",
"created": "2013-10-15T02:10:35Z",
"flavor": {
"id": "1",
@ -53,4 +53,4 @@
"updated": "2013-10-15T02:10:35Z",
"user_id": "fake"
}
}
}

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2013-10-15T02:10:27Z" user_id="fake" name="new-server-test" created="2013-10-15T02:10:27Z" tenant_id="openstack" progress="0" host_id="197205cc7340272607a9c5fa34f3520bbf53103399a6e80a06b67583" id="beb22987-dd7c-4791-8b7a-542c4f53cdd7" admin_pass="whSjs3JXbb6p" os-disk-config:disk_config="AUTO">
<server xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="2013-10-15T02:10:27Z" user_id="fake" name="new-server-test" created="2013-10-15T02:10:27Z" tenant_id="openstack" progress="0" host_id="197205cc7340272607a9c5fa34f3520bbf53103399a6e80a06b67583" id="beb22987-dd7c-4791-8b7a-542c4f53cdd7" admin_password="whSjs3JXbb6p" os-disk-config:disk_config="AUTO">
<image id="70a599e0-31e7-49b7-b260-868f441e862b">
<atom:link href="http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b" rel="bookmark"/>
</image>
@ -16,4 +16,4 @@
</addresses>
<atom:link href="http://openstack.example.com/v3/servers/beb22987-dd7c-4791-8b7a-542c4f53cdd7" rel="self"/>
<atom:link href="http://openstack.example.com/servers/beb22987-dd7c-4791-8b7a-542c4f53cdd7" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "S3uGgNnQRb4V",
"admin_password": "S3uGgNnQRb4V",
"id": "e1f469a7-1d3c-44ad-ac17-312596b84e0c",
"links": [
{
@ -14,4 +14,4 @@
],
"os-disk-config:disk_config": "AUTO"
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="31c9e8eb-0527-4dfe-a631-52d487baa7be" admin_pass="Sjn7LYAiNLZH" os-disk-config:disk_config="AUTO">
<server xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="31c9e8eb-0527-4dfe-a631-52d487baa7be" admin_password="Sjn7LYAiNLZH" os-disk-config:disk_config="AUTO">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/31c9e8eb-0527-4dfe-a631-52d487baa7be" rel="self"/>
<atom:link href="http://openstack.example.com/servers/31c9e8eb-0527-4dfe-a631-52d487baa7be" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "xCQm2Cs2vSFx",
"admin_password": "xCQm2Cs2vSFx",
"id": "5f1fbc62-29ed-4e4a-9f15-8affc5e0a796",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="3a562c8b-23d4-4e66-81d5-db0892a86f87" admin_pass="N6HYdUMchD3L">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="3a562c8b-23d4-4e66-81d5-db0892a86f87" admin_password="N6HYdUMchD3L">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/3a562c8b-23d4-4e66-81d5-db0892a86f87" rel="self"/>
<atom:link href="http://openstack.example.com/servers/3a562c8b-23d4-4e66-81d5-db0892a86f87" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "87taVVreqh6R",
"admin_password": "87taVVreqh6R",
"id": "f22e4521-d03a-4e9f-9fd3-016b9e227219",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="81a6e93a-eeeb-4169-b562-bbe42bffea27" admin_pass="3XURfmU9HAE5">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="81a6e93a-eeeb-4169-b562-bbe42bffea27" admin_password="3XURfmU9HAE5">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/81a6e93a-eeeb-4169-b562-bbe42bffea27" rel="self"/>
<atom:link href="http://openstack.example.com/servers/81a6e93a-eeeb-4169-b562-bbe42bffea27" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "UCvmH8nHXm66",
"admin_password": "UCvmH8nHXm66",
"id": "a8c1c13d-ec7e-47c7-b4ff-077f72c1ca46",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="17f2690d-2369-4b8a-9b28-66e503c079e9" admin_pass="NnZmn7JoUMHd">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="17f2690d-2369-4b8a-9b28-66e503c079e9" admin_password="NnZmn7JoUMHd">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/17f2690d-2369-4b8a-9b28-66e503c079e9" rel="self"/>
<atom:link href="http://openstack.example.com/servers/17f2690d-2369-4b8a-9b28-66e503c079e9" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "EugbD2jAD2V2",
"admin_password": "EugbD2jAD2V2",
"id": "a868cb5e-c794-47bf-9cd8-e302b72bb94b",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="712915a0-9acb-4ff5-aa4c-f546cd50d3f6" admin_pass="32qXqn6SVG7b">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="712915a0-9acb-4ff5-aa4c-f546cd50d3f6" admin_password="32qXqn6SVG7b">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/712915a0-9acb-4ff5-aa4c-f546cd50d3f6" rel="self"/>
<atom:link href="http://openstack.example.com/servers/712915a0-9acb-4ff5-aa4c-f546cd50d3f6" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "uNqGTziMK3px",
"admin_password": "uNqGTziMK3px",
"id": "7d62983e-23df-4320-bc89-bbc77f2a2e40",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="94b8c880-5d06-4f3d-a120-e1f43193e26d" admin_pass="6Hpc3u95ukbb">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="94b8c880-5d06-4f3d-a120-e1f43193e26d" admin_password="6Hpc3u95ukbb">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/94b8c880-5d06-4f3d-a120-e1f43193e26d" rel="self"/>
<atom:link href="http://openstack.example.com/servers/94b8c880-5d06-4f3d-a120-e1f43193e26d" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "5bjyggD6SaSB",
"admin_password": "5bjyggD6SaSB",
"id": "3d8bedd4-003d-417a-8cd7-a94cb181185d",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="3cf4865f-f5ea-44fa-91ce-019588133286" admin_pass="fG4cCiZVtf8p">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="3cf4865f-f5ea-44fa-91ce-019588133286" admin_password="fG4cCiZVtf8p">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/3cf4865f-f5ea-44fa-91ce-019588133286" rel="self"/>
<atom:link href="http://openstack.example.com/servers/3cf4865f-f5ea-44fa-91ce-019588133286" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "5Y9rR4XaM8Qg",
"admin_password": "5Y9rR4XaM8Qg",
"id": "bbe8d469-e8cb-49b1-96d8-f93b68c82355",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="fcfa0d46-4f4d-4fa5-a255-5b1d826b5331" admin_pass="ofbz7nspfcQt">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="fcfa0d46-4f4d-4fa5-a255-5b1d826b5331" admin_password="ofbz7nspfcQt">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/fcfa0d46-4f4d-4fa5-a255-5b1d826b5331" rel="self"/>
<atom:link href="http://openstack.example.com/servers/fcfa0d46-4f4d-4fa5-a255-5b1d826b5331" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "Kwg5tff6KiUU",
"admin_password": "Kwg5tff6KiUU",
"id": "8619225c-67c8-424f-9b46-cec5bad137a2",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="7cfaf61c-9b84-40b1-95f3-4ecd07b7b4db" admin_pass="cAKiM6sT5LaU">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="7cfaf61c-9b84-40b1-95f3-4ecd07b7b4db" admin_password="cAKiM6sT5LaU">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/7cfaf61c-9b84-40b1-95f3-4ecd07b7b4db" rel="self"/>
<atom:link href="http://openstack.example.com/servers/7cfaf61c-9b84-40b1-95f3-4ecd07b7b4db" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "8RK85ufqhJVq",
"admin_password": "8RK85ufqhJVq",
"id": "edfc3905-1f3c-4819-8fc3-a7d8131cfa22",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="46d75a5e-8eb5-4268-849a-b109c1fbed45" admin_pass="rdATBmaKT7my">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="46d75a5e-8eb5-4268-849a-b109c1fbed45" admin_password="rdATBmaKT7my">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/46d75a5e-8eb5-4268-849a-b109c1fbed45" rel="self"/>
<atom:link href="http://openstack.example.com/servers/46d75a5e-8eb5-4268-849a-b109c1fbed45" rel="bookmark"/>
</server>
</server>

View File

@ -1,5 +1,5 @@
{
"rescue": {
"admin_pass": "MySecretPass"
"admin_password": "MySecretPass"
}
}
}

View File

@ -1,3 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<rescue xmlns="http://docs.openstack.org/compute/api/v1.1"
admin_pass="MySecretPass"/>
admin_password="MySecretPass"/>

View File

@ -1,3 +1,3 @@
{
"admin_pass": "MySecretPass"
}
"admin_password": "MySecretPass"
}

View File

@ -1,2 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<admin_pass>MySecretPass</admin_pass>
<admin_password>MySecretPass</admin_password>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "ki8cbWeZdxH6",
"admin_password": "ki8cbWeZdxH6",
"id": "2dabdd93-ced7-4607-a542-2516de84e0e5",
"links": [
{
@ -18,4 +18,4 @@
}
]
}
}
}

View File

@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="c7edb38c-18bf-4522-8ddc-3af9dd3ab513" admin_pass="55v3adHeAzSM">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="c7edb38c-18bf-4522-8ddc-3af9dd3ab513" admin_password="55v3adHeAzSM">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/c7edb38c-18bf-4522-8ddc-3af9dd3ab513" rel="self"/>
<atom:link href="http://openstack.example.com/servers/c7edb38c-18bf-4522-8ddc-3af9dd3ab513" rel="bookmark"/>
<security_groups>
<security_group name="test"/>
</security_groups>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "H83mnjinc5jy",
"admin_password": "H83mnjinc5jy",
"id": "b2bbf280-a78d-4724-90ba-b00dd5659097",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="40cefec3-6e0d-4e5b-9c1a-64d0bd407ce9" admin_pass="SY4ozi9N4Jw9">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="40cefec3-6e0d-4e5b-9c1a-64d0bd407ce9" admin_password="SY4ozi9N4Jw9">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/40cefec3-6e0d-4e5b-9c1a-64d0bd407ce9" rel="self"/>
<atom:link href="http://openstack.example.com/servers/40cefec3-6e0d-4e5b-9c1a-64d0bd407ce9" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "kmspFLBzL75q",
"admin_password": "kmspFLBzL75q",
"id": "f8eeb5ba-19b7-49be-a1a9-10250dda5b14",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="47c587b4-d7ad-4028-878a-e94aabfc9617" admin_pass="Yq96XpsF8zqp">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="47c587b4-d7ad-4028-878a-e94aabfc9617" admin_password="Yq96XpsF8zqp">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/47c587b4-d7ad-4028-878a-e94aabfc9617" rel="self"/>
<atom:link href="http://openstack.example.com/servers/47c587b4-d7ad-4028-878a-e94aabfc9617" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "andqf3WBEYDj",
"admin_password": "andqf3WBEYDj",
"id": "69eaa1f4-7be0-42d5-934f-320cdc80981d",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="f14ff0d3-cebe-4692-9202-71946f4db8e4" admin_pass="wQxFoinL5p2y">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="f14ff0d3-cebe-4692-9202-71946f4db8e4" admin_password="wQxFoinL5p2y">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/f14ff0d3-cebe-4692-9202-71946f4db8e4" rel="self"/>
<atom:link href="http://openstack.example.com/servers/f14ff0d3-cebe-4692-9202-71946f4db8e4" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "2xHoDU7Gd7vw",
"admin_password": "2xHoDU7Gd7vw",
"id": "976a62bb-0d4a-4e17-9044-1864e888a557",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="ef0b499b-2e71-49d2-9046-35e109e54fc7" admin_pass="Azv87mjfLceW">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="ef0b499b-2e71-49d2-9046-35e109e54fc7" admin_password="Azv87mjfLceW">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/ef0b499b-2e71-49d2-9046-35e109e54fc7" rel="self"/>
<atom:link href="http://openstack.example.com/servers/ef0b499b-2e71-49d2-9046-35e109e54fc7" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "Ag463BYwnXEf",
"admin_password": "Ag463BYwnXEf",
"id": "0813a7dc-8e97-42df-9634-957109499bf0",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="8fee36b1-43ce-4380-a360-0b03c9571319" admin_pass="t7CaoxDhmBm8">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="8fee36b1-43ce-4380-a360-0b03c9571319" admin_password="t7CaoxDhmBm8">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/8fee36b1-43ce-4380-a360-0b03c9571319" rel="self"/>
<atom:link href="http://openstack.example.com/servers/8fee36b1-43ce-4380-a360-0b03c9571319" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "ys9M8HQXvwEJ",
"admin_password": "ys9M8HQXvwEJ",
"id": "a6ebe5b4-b68b-420b-9c1e-620c4d3e0389",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="80cd3928-5ce9-44a1-9257-88847c37f9e4" admin_pass="6GXmk5m4AXpy">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="80cd3928-5ce9-44a1-9257-88847c37f9e4" admin_password="6GXmk5m4AXpy">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/80cd3928-5ce9-44a1-9257-88847c37f9e4" rel="self"/>
<atom:link href="http://openstack.example.com/servers/80cd3928-5ce9-44a1-9257-88847c37f9e4" rel="bookmark"/>
</server>
</server>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "6NpUwoz2QDRN",
"admin_password": "6NpUwoz2QDRN",
"id": "f5dc173b-6804-445a-a6d8-c705dad5b5eb",
"links": [
{
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="b7244821-09f6-4931-a59f-433bc9a00edc" admin_pass="qvVB4ayUcia8">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="b7244821-09f6-4931-a59f-433bc9a00edc" admin_password="qvVB4ayUcia8">
<metadata/>
<atom:link href="http://openstack.example.com/v3/servers/b7244821-09f6-4931-a59f-433bc9a00edc" rel="self"/>
<atom:link href="http://openstack.example.com/servers/b7244821-09f6-4931-a59f-433bc9a00edc" rel="bookmark"/>
</server>
</server>

View File

@ -55,8 +55,8 @@ class RescueController(wsgi.Controller):
context = req.environ["nova.context"]
authorize(context)
if body['rescue'] and 'admin_pass' in body['rescue']:
password = body['rescue']['admin_pass']
if body['rescue'] and 'admin_password' in body['rescue']:
password = body['rescue']['admin_password']
else:
password = utils.generate_password()
@ -74,7 +74,7 @@ class RescueController(wsgi.Controller):
explanation=non_rescuable.format_message())
if CONF.enable_instance_password:
return {'admin_pass': password}
return {'admin_password': password}
else:
return {}

View File

@ -129,7 +129,7 @@ class ServersTemplate(xmlutil.TemplateBuilder):
class ServerAdminPassTemplate(xmlutil.TemplateBuilder):
def construct(self):
root = xmlutil.TemplateElement('server')
root.set('admin_pass')
root.set('admin_password')
return xmlutil.SlaveTemplate(root, 1, nsmap=server_nsmap)
@ -157,7 +157,7 @@ class CommonDeserializer(wsgi.MetadataXMLDeserializer):
server = {}
server_node = self.find_first_child_named(node, 'server')
attributes = ["name", "image_ref", "flavor_ref", "admin_pass",
attributes = ["name", "image_ref", "flavor_ref", "admin_password",
"key_name"]
for attr in attributes:
if server_node.getAttribute(attr):
@ -245,8 +245,8 @@ class ActionDeserializer(CommonDeserializer):
raise AttributeError("No image_ref was specified in request")
rebuild["image_ref"] = node.getAttribute("image_ref")
if node.hasAttribute("admin_pass"):
rebuild["admin_pass"] = node.getAttribute("admin_pass")
if node.hasAttribute("admin_password"):
rebuild["admin_password"] = node.getAttribute("admin_password")
if self.controller:
self.controller.server_rebuild_xml_deserialize(node, rebuild)
@ -821,7 +821,7 @@ class ServersController(wsgi.Controller):
server = self._view_builder.create(req, instances[0])
if CONF.enable_instance_password:
server['server']['admin_pass'] = password
server['server']['admin_password'] = password
robj = wsgi.ResponseObject(server)
@ -1135,10 +1135,10 @@ class ServersController(wsgi.Controller):
view = self._view_builder.show(req, instance)
# Add on the admin_pass attribute since the view doesn't do it
# Add on the admin_password attribute since the view doesn't do it
# unless instance passwords are disabled
if CONF.enable_instance_password:
view['server']['admin_pass'] = password
view['server']['admin_password'] = password
robj = wsgi.ResponseObject(view)
return self._add_location(robj)
@ -1218,12 +1218,12 @@ class ServersController(wsgi.Controller):
def _get_server_admin_password(self, server):
"""Determine the admin password for a server on creation."""
try:
password = server['admin_pass']
password = server['admin_password']
self._validate_admin_password(password)
except KeyError:
password = utils.generate_password()
except ValueError:
raise exc.HTTPBadRequest(explanation=_("Invalid admin_pass"))
raise exc.HTTPBadRequest(explanation=_("Invalid admin_password"))
return password

View File

@ -12,7 +12,7 @@
<attribute name="progress"> <text/> </attribute>
</optional>
<optional>
<attribute name="admin_pass"><text/> </attribute>
<attribute name="admin_password"><text/> </attribute>
</optional>
<element name="image">
<attribute name="id"> <text/> </attribute>

View File

@ -74,15 +74,16 @@ _ROUTES_METHODS = [
'update',
]
_SANITIZE_KEYS = ['adminPass', 'admin_pass']
_SANITIZE_KEYS = ['adminPass', 'admin_password']
_SANITIZE_PATTERNS = [
re.compile(r'(adminPass\s*[=]\s*[\"\']).*?([\"\'])', re.DOTALL),
re.compile(r'(admin_pass\s*[=]\s*[\"\']).*?([\"\'])', re.DOTALL),
re.compile(r'(admin_password\s*[=]\s*[\"\']).*?([\"\'])', re.DOTALL),
re.compile(r'(<adminPass>).*?(</adminPass>)', re.DOTALL),
re.compile(r'(<admin_pass>).*?(</admin_pass>)', re.DOTALL),
re.compile(r'(<admin_password>).*?(</admin_password>)', re.DOTALL),
re.compile(r'([\"\']adminPass[\"\']\s*:\s*[\"\']).*?([\"\'])', re.DOTALL),
re.compile(r'([\"\']admin_pass[\"\']\s*:\s*[\"\']).*?([\"\'])', re.DOTALL)
re.compile(r'([\"\']admin_password[\"\']\s*:\s*[\"\']).*?([\"\'])',
re.DOTALL)
]

View File

@ -87,7 +87,7 @@ def stub_instance(id, user_id='fake', project_id='fake', host=None,
"id": int(id),
"created_at": datetime.datetime(2010, 10, 10, 12, 0, 0),
"updated_at": datetime.datetime(2010, 11, 11, 11, 0, 0),
"admin_pass": "",
"admin_password": "",
"user_id": user_id,
"project_id": project_id,
"image_ref": image_ref,

View File

@ -327,7 +327,7 @@ class ServersControllerCreateTest(test.TestCase):
res = self.controller.create(req, body).obj
self.assertEqual(FAKE_UUID, res["server"]["id"])
self._check_admin_pass_len(res["server"])
self._check_admin_password_len(res["server"])
def test_create_multiple_instances_pass_disabled(self):
"""Test creating multiple instances but not asking for
@ -355,16 +355,16 @@ class ServersControllerCreateTest(test.TestCase):
res = self.controller.create(req, body).obj
self.assertEqual(FAKE_UUID, res["server"]["id"])
self._check_admin_pass_missing(res["server"])
self._check_admin_password_missing(res["server"])
def _check_admin_pass_len(self, server_dict):
"""utility function - check server_dict for admin_pass length."""
def _check_admin_password_len(self, server_dict):
"""utility function - check server_dict for admin_password length."""
self.assertEqual(CONF.password_length,
len(server_dict["admin_pass"]))
len(server_dict["admin_password"]))
def _check_admin_pass_missing(self, server_dict):
"""utility function - check server_dict for absence of adminPass."""
self.assertNotIn("admin_pass", server_dict)
def _check_admin_password_missing(self, server_dict):
"""utility function - check server_dict for admin_password absence."""
self.assertNotIn("admin_password", server_dict)
def test_create_multiple_instances_resv_id_return(self):
"""Test creating multiple instances with asking for

View File

@ -47,7 +47,7 @@ class RescueTest(test.NoDBTestCase):
self.app = fakes.wsgi_app_v3(init_only=('servers', 'os-rescue'))
def test_rescue_with_preset_password(self):
body = {"rescue": {"admin_pass": "AABBCC112233"}}
body = {"rescue": {"admin_password": "AABBCC112233"}}
req = webob.Request.blank('/v3/servers/test_inst/action')
req.method = "POST"
req.body = jsonutils.dumps(body)
@ -56,7 +56,7 @@ class RescueTest(test.NoDBTestCase):
resp = req.get_response(self.app)
self.assertEqual(resp.status_int, 202)
resp_json = jsonutils.loads(resp.body)
self.assertEqual("AABBCC112233", resp_json['admin_pass'])
self.assertEqual("AABBCC112233", resp_json['admin_password'])
def test_rescue_generates_password(self):
body = dict(rescue=None)
@ -68,7 +68,8 @@ class RescueTest(test.NoDBTestCase):
resp = req.get_response(self.app)
self.assertEqual(resp.status_int, 202)
resp_json = jsonutils.loads(resp.body)
self.assertEqual(CONF.password_length, len(resp_json['admin_pass']))
self.assertEqual(CONF.password_length,
len(resp_json['admin_password']))
def test_rescue_disable_password(self):
self.flags(enable_instance_password=False)
@ -81,7 +82,7 @@ class RescueTest(test.NoDBTestCase):
resp = req.get_response(self.app)
self.assertEqual(resp.status_int, 202)
resp_json = jsonutils.loads(resp.body)
self.assertNotIn('admin_pass', resp_json)
self.assertNotIn('admin_password', resp_json)
def test_rescue_of_rescued_instance(self):
body = dict(rescue=None)

View File

@ -194,7 +194,7 @@ class ServerActionsControllerTest(test.TestCase):
body = robj.obj
self.assertEqual(body['server']['image']['id'], '2')
self.assertEqual(len(body['server']['admin_pass']),
self.assertEqual(len(body['server']['admin_password']),
CONF.password_length)
self.assertEqual(robj['location'], self_href)
@ -246,7 +246,7 @@ class ServerActionsControllerTest(test.TestCase):
self.assertEqual(info['image_href_in_call'], image_uuid)
def test_rebuild_accepted_minimum_pass_disabled(self):
# run with enable_instance_password disabled to verify admin_pass
# run with enable_instance_password disabled to verify admin_password
# is missing from response. See lp bug 921814
self.flags(enable_instance_password=False)
@ -266,7 +266,7 @@ class ServerActionsControllerTest(test.TestCase):
body = robj.obj
self.assertEqual(body['server']['image']['id'], '2')
self.assertNotIn("admin_pass", body['server'])
self.assertNotIn("admin_password", body['server'])
self.assertEqual(robj['location'], self_href)
@ -364,7 +364,7 @@ class ServerActionsControllerTest(test.TestCase):
self.assertNotIn('personality', body['server'])
def test_rebuild_admin_pass(self):
def test_rebuild_admin_password(self):
return_server = fakes.fake_instance_get(image_ref='2',
vm_state=vm_states.ACTIVE, host='fake_host')
self.stubs.Set(db, 'instance_get_by_uuid', return_server)
@ -372,7 +372,7 @@ class ServerActionsControllerTest(test.TestCase):
body = {
"rebuild": {
"image_ref": self._image_href,
"admin_pass": "asdf",
"admin_password": "asdf",
},
}
@ -380,10 +380,10 @@ class ServerActionsControllerTest(test.TestCase):
body = self.controller._action_rebuild(req, FAKE_UUID, body).obj
self.assertEqual(body['server']['image']['id'], '2')
self.assertEqual(body['server']['admin_pass'], 'asdf')
self.assertEqual(body['server']['admin_password'], 'asdf')
def test_rebuild_admin_pass_pass_disabled(self):
# run with enable_instance_password disabled to verify admin_pass
def test_rebuild_admin_password_pass_disabled(self):
# run with enable_instance_password disabled to verify admin_password
# is missing from response. See lp bug 921814
self.flags(enable_instance_password=False)
@ -394,7 +394,7 @@ class ServerActionsControllerTest(test.TestCase):
body = {
"rebuild": {
"image_ref": self._image_href,
"admin_pass": "asdf",
"admin_password": "asdf",
},
}
@ -402,7 +402,7 @@ class ServerActionsControllerTest(test.TestCase):
body = self.controller._action_rebuild(req, FAKE_UUID, body).obj
self.assertEqual(body['server']['image']['id'], '2')
self.assertNotIn('admin_pass', body['server'])
self.assertNotIn('admin_password', body['server'])
def test_rebuild_server_not_found(self):
def server_not_found(self, instance_id,

View File

@ -1679,14 +1679,14 @@ class ServersControllerCreateTest(test.TestCase):
self.req.method = 'POST'
self.req.headers["content-type"] = "application/json"
def _check_admin_pass_len(self, server_dict):
"""utility function - check server_dict for admin_pass length."""
def _check_admin_password_len(self, server_dict):
"""utility function - check server_dict for admin_password length."""
self.assertEqual(CONF.password_length,
len(server_dict["admin_pass"]))
len(server_dict["admin_password"]))
def _check_admin_pass_missing(self, server_dict):
"""utility function - check server_dict for absence of admin_pass."""
self.assertNotIn("admin_pass", server_dict)
def _check_admin_password_missing(self, server_dict):
"""utility function - check server_dict for admin_password absence."""
self.assertNotIn("admin_password", server_dict)
def _test_create_instance(self, flavor=2):
image_uuid = 'c905cedb-7281-47e4-8a62-f26bc5fc4c77'
@ -1694,7 +1694,7 @@ class ServersControllerCreateTest(test.TestCase):
self.body['server']['flavor_ref'] = flavor
self.req.body = jsonutils.dumps(self.body)
server = self.controller.create(self.req, self.body).obj['server']
self._check_admin_pass_len(server)
self._check_admin_password_len(server)
self.assertEqual(FAKE_UUID, server['id'])
def test_create_instance_private_flavor(self):
@ -1898,7 +1898,7 @@ class ServersControllerCreateTest(test.TestCase):
res = self.controller.create(self.req, self.body).obj
server = res['server']
self._check_admin_pass_missing(server)
self._check_admin_password_missing(server)
self.assertEqual(FAKE_UUID, server['id'])
def test_create_instance_name_too_long(self):
@ -1949,7 +1949,7 @@ class ServersControllerCreateTest(test.TestCase):
res = self.controller.create(self.req, self.body).obj
server = res['server']
self._check_admin_pass_len(server)
self._check_admin_password_len(server)
self.assertEqual(FAKE_UUID, server['id'])
def test_create_instance_extension_create_exception(self):
@ -1990,7 +1990,7 @@ class ServersControllerCreateTest(test.TestCase):
res = self.controller.create(self.req, self.body).obj
server = res['server']
self._check_admin_pass_missing(server)
self._check_admin_password_missing(server)
self.assertEqual(FAKE_UUID, server['id'])
def test_create_instance_too_much_metadata(self):
@ -2053,7 +2053,7 @@ class ServersControllerCreateTest(test.TestCase):
res = self.controller.create(self.req, self.body).obj
self.assertEqual(FAKE_UUID, res["server"]["id"])
self._check_admin_pass_len(res["server"])
self._check_admin_password_len(res["server"])
def test_create_instance_invalid_flavor_href(self):
image_href = 'http://localhost/v2/images/2'
@ -2097,29 +2097,29 @@ class ServersControllerCreateTest(test.TestCase):
server = res['server']
self.assertEqual(FAKE_UUID, server['id'])
def test_create_instance_admin_pass(self):
def test_create_instance_admin_password(self):
self.body['server']['flavor_ref'] = 3,
self.body['server']['admin_pass'] = 'testpass'
self.body['server']['admin_password'] = 'testpass'
self.req.body = jsonutils.dumps(self.body)
res = self.controller.create(self.req, self.body).obj
server = res['server']
self.assertEqual(server['admin_pass'],
self.body['server']['admin_pass'])
self.assertEqual(server['admin_password'],
self.body['server']['admin_password'])
def test_create_instance_admin_pass_pass_disabled(self):
def test_create_instance_admin_password_pass_disabled(self):
self.flags(enable_instance_password=False)
self.body['server']['flavor_ref'] = 3,
self.body['server']['admin_pass'] = 'testpass'
self.body['server']['admin_password'] = 'testpass'
self.req.body = jsonutils.dumps(self.body)
res = self.controller.create(self.req, self.body).obj
server = res['server']
self.assertIn('admin_pass', self.body['server'])
self.assertIn('admin_password', self.body['server'])
def test_create_instance_admin_pass_empty(self):
def test_create_instance_admin_password_empty(self):
self.body['server']['flavor_ref'] = 3,
self.body['server']['admin_pass'] = ''
self.body['server']['admin_password'] = ''
self.req.body = jsonutils.dumps(self.body)
# The fact that the action doesn't raise is enough validation
@ -2264,20 +2264,20 @@ class TestServerCreateRequestXMLDeserializer(test.TestCase):
}
self.assertEqual(request['body'], expected)
def test_admin_pass(self):
def test_admin_password(self):
serial_request = """
<server xmlns="http://docs.openstack.org/compute/api/v2"
name="new-server-test"
image_ref="1"
flavor_ref="2"
admin_pass="1234"/>"""
admin_password="1234"/>"""
request = self.deserializer.deserialize(serial_request)
expected = {
"server": {
"name": "new-server-test",
"image_ref": "1",
"flavor_ref": "2",
"admin_pass": "1234",
"admin_password": "1234",
},
}
self.assertEqual(request['body'], expected)
@ -3268,7 +3268,7 @@ class ServerXMLSerializationTest(test.TestCase):
"name": "test_server",
"status": "BUILD",
"host_id": "e4d909c290d0fb1ca068ffaddf22cbd0",
"admin_pass": "test_password",
"admin_password": "test_password",
"image": {
"id": "5",
"links": [
@ -3341,7 +3341,8 @@ class ServerXMLSerializationTest(test.TestCase):
server_dict = fixture['server']
for key in ['name', 'id', 'created',
'updated', 'progress', 'status', 'host_id', 'admin_pass']:
'updated', 'progress', 'status', 'host_id',
'admin_password']:
self.assertEqual(root.get(key), str(server_dict[key]))
link_nodes = root.findall('{0}link'.format(ATOMNS))
@ -3881,7 +3882,7 @@ class ServerXMLSerializationTest(test.TestCase):
"name": "test_server",
"status": "BUILD",
"host_id": "e4d909c290d0fb1ca068ffaddf22cbd0",
"admin_pass": "test_password",
"admin_password": "test_password",
"image": {
"id": "5",
"links": [
@ -3954,7 +3955,8 @@ class ServerXMLSerializationTest(test.TestCase):
server_dict = fixture['server']
for key in ['name', 'id', 'created',
'updated', 'progress', 'status', 'host_id', 'admin_pass']:
'updated', 'progress', 'status', 'host_id',
'admin_password']:
self.assertEqual(root.get(key), str(server_dict[key]))
link_nodes = root.findall('{0}link'.format(ATOMNS))

View File

@ -1087,11 +1087,11 @@ class TestSanitize(test.NoDBTestCase):
payload = """{ 'adminPass' : 'mypassword' }"""
expected = """{ 'adminPass' : '****' }"""
self.assertEqual(expected, wsgi.sanitize(payload))
payload = """{'admin_pass':'mypassword'}"""
expected = """{'admin_pass':'****'}"""
payload = """{'admin_password':'mypassword'}"""
expected = """{'admin_password':'****'}"""
self.assertEqual(expected, wsgi.sanitize(payload))
payload = """{ 'admin_pass' : 'mypassword' }"""
expected = """{ 'admin_pass' : '****' }"""
payload = """{ 'admin_password' : 'mypassword' }"""
expected = """{ 'admin_password' : '****' }"""
self.assertEqual(expected, wsgi.sanitize(payload))
def test_xml(self):
@ -1103,13 +1103,13 @@ class TestSanitize(test.NoDBTestCase):
</adminPass>"""
expected = """<adminPass>****</adminPass>"""
self.assertEqual(expected, wsgi.sanitize(payload))
payload = """<admin_pass>mypassword</admin_pass>"""
expected = """<admin_pass>****</admin_pass>"""
payload = """<admin_password>mypassword</admin_password>"""
expected = """<admin_password>****</admin_password>"""
self.assertEqual(expected, wsgi.sanitize(payload))
payload = """<admin_pass>
payload = """<admin_password>
mypassword
</admin_pass>"""
expected = """<admin_pass>****</admin_pass>"""
</admin_password>"""
expected = """<admin_password>****</admin_password>"""
self.assertEqual(expected, wsgi.sanitize(payload))
def test_xml_attribute(self):
@ -1122,22 +1122,22 @@ class TestSanitize(test.NoDBTestCase):
payload = """adminPass = "mypassword\""""
expected = """adminPass = "****\""""
self.assertEqual(expected, wsgi.sanitize(payload))
payload = """admin_pass='mypassword'"""
expected = """admin_pass='****'"""
payload = """admin_password='mypassword'"""
expected = """admin_password='****'"""
self.assertEqual(expected, wsgi.sanitize(payload))
payload = """admin_pass = 'mypassword'"""
expected = """admin_pass = '****'"""
payload = """admin_password = 'mypassword'"""
expected = """admin_password = '****'"""
self.assertEqual(expected, wsgi.sanitize(payload))
payload = """admin_pass = "mypassword\""""
expected = """admin_pass = "****\""""
payload = """admin_password = "mypassword\""""
expected = """admin_password = "****\""""
self.assertEqual(expected, wsgi.sanitize(payload))
def test_json_message(self):
payload = """body: {"changePassword": {"adminPass": "1234567"}}"""
expected = """body: {"changePassword": {"adminPass": "****"}}"""
self.assertEqual(expected, wsgi.sanitize(payload))
payload = """body: {"rescue": {"admin_pass": "1234567"}}"""
expected = """body: {"rescue": {"admin_pass": "****"}}"""
payload = """body: {"rescue": {"admin_password": "1234567"}}"""
expected = """body: {"rescue": {"admin_password": "****"}}"""
self.assertEqual(expected, wsgi.sanitize(payload))
def test_xml_message(self):
@ -1168,8 +1168,8 @@ class TestSanitize(test.NoDBTestCase):
self.assertEqual(expected, wsgi.sanitize(payload))
payload = """<?xml version="1.0" encoding="UTF-8"?>
<rescue xmlns="http://docs.openstack.org/compute/api/v1.1"
admin_pass="MySecretPass"/>"""
admin_password="MySecretPass"/>"""
expected = """<?xml version="1.0" encoding="UTF-8"?>
<rescue xmlns="http://docs.openstack.org/compute/api/v1.1"
admin_pass="****"/>"""
admin_password="****"/>"""
self.assertEqual(expected, wsgi.sanitize(payload))

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s" os-disk-config:disk_config="AUTO" os-access-ips:access_ip_v4="" os-access-ips:access_ip_v6="">
<server xmlns:os-access-ips="http://docs.openstack.org/compute/ext/os-access-ips/api/v3" xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s" os-disk-config:disk_config="AUTO" os-access-ips:access_ip_v4="" os-access-ips:access_ip_v6="">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -10,7 +10,7 @@
}
]
},
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"created": "%(timestamp)s",
"flavor": {
"id": "1",

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="%(timestamp)s" user_id="fake" name="new-server-test" created="%(timestamp)s" tenant_id="openstack" progress="0" host_id="%(hostid)s" id="%(id)s" admin_pass="%(password)s" os-disk-config:disk_config="AUTO">
<server xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" status="ACTIVE" updated="%(timestamp)s" user_id="fake" name="new-server-test" created="%(timestamp)s" tenant_id="openstack" progress="0" host_id="%(hostid)s" id="%(id)s" admin_password="%(password)s" os-disk-config:disk_config="AUTO">
<image id="%(uuid)s">
<atom:link href="%(glance_host)s/images/%(uuid)s" rel="bookmark"/>
</image>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"os-disk-config:disk_config": "AUTO",
"links": [

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s" os-disk-config:disk_config="AUTO">
<server xmlns:os-disk-config="http://docs.openstack.org/compute/ext/disk_config/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s" os-disk-config:disk_config="AUTO">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

View File

@ -1,6 +1,6 @@
{
"server": {
"admin_pass": "%(password)s",
"admin_password": "%(password)s",
"id": "%(id)s",
"links": [
{

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_pass="%(password)s">
<server xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" id="%(id)s" admin_password="%(password)s">
<metadata/>
<atom:link href="%(host)s/v3/servers/%(uuid)s" rel="self"/>
<atom:link href="%(host)s/servers/%(uuid)s" rel="bookmark"/>

Some files were not shown because too many files have changed in this diff Show More