65 Commits

Author SHA1 Message Date
Takashi NATSUME
3b01a728ce api-ref: Example verification for servers.inc
This patch verifies request and response bodies in servers.inc.

Change-Id: I9266e7513ed6eb00599dc766081ce81014a209bb
Closes-Bug: #1739573
2018-07-09 14:47:46 +00:00
Takashi NATSUME
0ffd2529b1 api-ref: Fix parameters about trusted certificate IDs
Fix the location of the 'trusted_image_certificates'
parameter in the parameter list
of the request body in the "Create Server" API.

Add an additional description that explains
the value is null if the trusted certificate IDs are not set
in the description for the 'trusted_image_certificates' parameter
in the response body.

Change-Id: Ibd3763044068c64b88a28d6c541c569233e112f8
Closes-Bug: #1777394
2018-06-22 02:52:33 +00:00
Brianna Poulos
8c7ca368b1 Add trusted_image_certificates to REST API
This change adds support for the trusted_image_certificates parameter,
which is used to define a list of trusted certificate IDs that can be
used during image signature verification and certificate validation. The
parameter may contain a list of strings, each string representing the ID
of a trusted certificate. The list is restricted to a maximum of 50 IDs.
The list of certificate IDs will be stored in the trusted_certs field of
the instance InstanceExtra and will be used to verify the validity of
the signing certificate of a signed instance image.

The trusted_image_certificates request parameter can be passed to
the server create and rebuild APIs (if allowed by policy):

* POST /servers
* POST /servers/{server_id}/action (rebuild)

The following policy rules were added to restrict the usage of the
``trusted_image_certificates`` request parameter in the server create
and rebuild APIs:

* os_compute_api:servers:create:trusted_certs
* os_compute_api:servers:rebuild:trusted_certs

The trusted_image_certificates parameter will be in the response
body of the following APIs (not restricted by policy):

* GET /servers/detail
* GET /servers/{server_id}
* PUT /servers/{server_id}
* POST /servers/{server_id}/action (rebuild)

APIImpact

Implements blueprint: nova-validate-certificates
Change-Id: Iedd3fea0e86648fae364f075915555dcb2c4f199
2018-06-13 15:52:59 -04:00
jichen
1c3151dd43 [doc] Add soft_deleted flag
soft_deleted is support in query but we didn't mention in the doc

bcb405e871/nova/db/sqlalchemy/api.py (L2127)

Change-Id: I1c5577a501144170e82c96c04cffbf32dcaa5cff
Closes-Bug: 1765575
2018-05-09 14:41:30 +00:00
Takashi NATSUME
39fbcfd518 api-ref: Parameter verification for servers.inc (3/3)
This patch completes parameter verification for servers.inc.

* Verifies remaining parameters
* Sorts parameters
* Adds missing parameters
* Removing unncessary parameters

Change-Id: If01b2dcfa9df8c0e80ad1da65115204fe321891b
Closes-Bug: #1738930
2018-04-11 00:33:52 +00:00
Takashi NATSUME
bab3184ced api-ref: Parameter verification for servers.inc (2/3)
This patch verifies BDM, fault and scheduler hint parameters.
A subsequent patch will verify other parameters.

Change-Id: If57aa3e37ebaa6fa13718480bb216d10664aa5b1
Partial-Bug: #1738930
2018-04-11 00:33:40 +00:00
Takashi NATSUME
56283f167d api-ref: Parameter verification for servers.inc (1/3)
This patch verifies query parameters.
Subsequent patches will verify other parameters.

Change-Id: I6078c0c8ebc888dc120f446f228a3b0433b89a76
Partial-Bug: #1738930
2018-03-27 17:06:45 +09:00
ghanshyam
f5cb62a1f4 Add server filters whitelist in server api-ref
We maintain the whitelist for valid server filters key
but have not documented those clearly.

This patch adds whitelist for non-admin and admin users.

Change-Id: Idc031916c804a18876551113a0fd57d4a463cd63
2018-01-30 09:24:46 +00:00
Matt Riedemann
126c3d4c78 Deprecate file injection
This microversion makes the following changes:

1. Deprecates personality files from POST /servers and the rebuild
   server action APIs.
2. Adds the ability to pass new user_data to the rebuild server
   action API.
3. Personality / file injection related limits and quota resources
   are removed from the limits, os-quota-sets and os-quota-class-sets
   APIs.

Implements blueprint deprecate-file-injection

Change-Id: Ia89eeb6725459c35369e8f790f68ad9180bd3aba
2017-12-12 09:22:21 -05:00
Zuul
691d99af63 Merge "block_device_mapping_v2.bus_type is missing from api-ref" 2017-11-14 12:37:01 +00:00
Kevin_Zheng
b6ed91d05c block_device_mapping_v2.bus_type is missing from api-ref
block_device_mapping_v2.bus_type is missing from
POST /servers API reference. This patch add it.

Change-Id: I998cf6195d72c80649e9e0fd43be0cf37f8e2f48
Closes-Bug: #1713895
2017-11-09 09:33:09 +08:00
Matt Riedemann
e315fcbec9 api-ref: fix server status values in GET /servers docs
The server status values exposed out of the API and used
for filtering when listing instances comes from the values
in nova.api.openstack.common._STATE_MAP. Some of the values
listed in the docs were incorrectly using variable names from
the code, which don't necessarily match the actual value exposed
out of the API.

The compute API server concepts guide actually had this all
correct, so this just updates the API reference.

Change-Id: I30b6f27c6e7fc9365c203b620b311785f8b4b489
Closes-Bug: #1722403
2017-10-11 16:33:15 -04:00
yushangbin
76323b39db Correct statement in api-ref
Change-Id: Idc69876695e04d85df942ea2374d89342b27dc0f
2017-08-21 11:33:34 +08:00
Kevin_Zheng
b50b5a660e Support tag instances when boot(4/4)
This is the 4th patch of the series,
this patch adds a new microversion
in API to support adding tags when
booting instances.

Implemetes: blueprint support-tag-instance-when-boot

Change-Id: Ifcaaf285c8f98a1d0e8bbbc87b2f57fbce057346
2017-07-17 15:59:42 -04:00
Chris Friesen
90636e0f33 show flavor info in server details
Add a new microversion to change the flavor field in the server
details to display a subset of the flavor information instead of
just a link to the original flavor.

This is more reliable since it shows the actual instance size, while
the flavor may have been deleted/recreated in the meantime or the
flavor extra-specs may have been modified.

Implements: blueprint instance-flavor-api
Change-Id: If646149efb7eec8c90bf7d07c39ff4c495349941
2017-06-02 12:09:24 -04:00
Jenkins
e5ffe02463 Merge "Fix api-ref for create servers response" 2017-04-11 12:06:44 +00:00
Jenkins
e78ff51bb4 Merge "api-ref: fix os-extended-volumes:volumes_attached in servers responses" 2017-04-11 12:04:39 +00:00
ghanshyam
435a898778 Fix api-ref for create servers response
create server API only return few elements in response
not all which are currently shown in api-ref.

This commit fix that.

Part of bp/api-ref-in-rst-pike

Change-Id: I782e97bc3ffb1e1c192b5a63736e524917739e4b
2017-04-11 03:20:19 +00:00
Jenkins
2669a89083 Merge "Add empty flavor object info in server api-ref" 2017-04-07 15:36:37 +00:00
Matt Riedemann
28831f3b3d api-ref: fix os-extended-volumes:volumes_attached in servers responses
There are two main changes here:

1. The contents of the os-extended-volumes:volumes_attached list are
   described, which are the id and delete_on_termination keys, the latter
   being introduced in the GET /servers response in 2.3.

2. The os-extended-volumes:volumes_attached parameters are removed from
   the PUT /servers and POST /servers responses, since we don't actually
   include those in the response for create and update operations, only
   GET /servers/{server_id} and GET /servers/detail operations.
   Note: create server is fixed in a follow up patch.

Change-Id: Ic92055e3095d220a3a11e35628f04e9e67c6b71a
Closes-Bug: #1675559
2017-04-07 13:40:08 +00:00
ghanshyam
af1734b0dd Add empty flavor object info in server api-ref
In case flavor information is not present in sysmeta then
GET/PUT server response can have flavor as empty object.

ref- http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/views/servers.py#n252

Having that mentioned in api-ref will be nice to understand it clearly.
Closes-Bug: #1677999

Change-Id: I350dc33df0cb03eb86df1f142e58ae34b02a1334
2017-04-05 02:52:41 +00:00
Jenkins
9b1ec228df Merge "Fix api-ref for adminPass behavior" 2017-03-31 15:17:35 +00:00
Takashi NATSUME
47bd7be882 api-ref: Fix wrong HTTP response codes
* POST /servers

  The 413 response code has not been expected
  since I470b53af45ff47c1dec98d09d7a426a29ca1efc6.
  So remove 413.

* POST /server/{server_id}/action

  In 'Rebuild' action, the 413 response code has not been expected
  since I470b53af45ff47c1dec98d09d7a426a29ca1efc6.
  So remove 413.

  In 'Rescue' action, the normal response code is actually 200
  instead of 202.
  So fix it.

Change-Id: I6e91d3ac751777f48ab084395a66cb3f83bfcca2
Implements: blueprint api-ref-in-rst-pike
Closes-Bug: #1677452
2017-03-30 13:51:07 +09:00
ghanshyam
78dee1de59 Fix api-ref for adminPass behavior
This commit fix the below doc issue for adminPass
 -'adminPass' attrbiure is only return in response if
  'enable_instance_password' configuration option is set to true
 - evacuate API stop returning adminPass from 2.14 microversion
   so max version for this field is 2.13.
 - if 'adminPass' is not present in request then, operation auto generate one.

Change-Id: I636657ed30b33da0a2df73b222c4ce5d8388a3d8
2017-03-28 06:51:01 +03:00
Jenkins
6dc60505f9 Merge "Add api-ref for filter/sort whitelist" 2017-03-17 16:13:44 +00:00
Kevin_Zheng
e06cb39121 Add api-ref for filter/sort whitelist
Add api-ref doc for the filter/sort whitelist,
showing what can be used to filter and
sort results when calling list server API.

Co-Authored-By: ghanshyam <ghanshyammann@gmail.com>
Change-Id: I821085f885f207408e56f73ccbf0956dc017ba78
2017-03-17 06:56:47 +00:00
tengqm
9092207b9a Fix API doc about server attributes (2.3 API)
The attribute names added in version 2.3 API was incorrectly documented.

Change-Id: Ib2cdb5191fc23ba87b1528c95afc019ec57b4103
2017-03-09 03:50:48 -05:00
Jenkins
918e80a7ee Merge "api-ref: fix delete server async postcondition docs" 2017-02-25 04:49:30 +00:00
Jenkins
312efe4563 Merge "api-ref: document the 'tenant_id' query parameter" 2017-02-09 14:18:10 +00:00
Matt Riedemann
26a961b584 api-ref: fix delete server async postcondition docs
Apparently we thought it was useful to tell you that
while a server is being deleted you could watch it's
status, but not enough that we cared to tell you what
status.

Change-Id: Ibb175c448712cbc0ff80353b83dcab524b223e4d
Closes-Bug: #1663036
2017-02-08 16:41:31 -05:00
Jordan Pittier
acfad7cf6f api-ref: document the 'tenant_id' query parameter
When listing servers, it's possible to filter servers based on
the tenant_id. This patch documents this.

Change-Id: I8432aa922cb61ef052cd1f7436546e69d7b6aceb
2017-02-07 16:02:47 +01:00
Artom Lifshitz
e80e2511cf Fix tag attribute disappearing in 2.33 and 2.37
In the context of device tagging, bugs have caused the tag attribute
to disappear starting with version 2.33 for block_devices and starting
with version 2.37 for network interfaces. In other words, block
devices could only be tagged in 2.32 and network interfaces between
2.32 and 2.36 inclusively.

This patch documents this behaviour in api-ref and introduces
microversion 2.42, which re-adds the tag in all the right places.

Change-Id: Ia0869dc6f7f5bd347ccbd0930d1d668d37695a22
Closes-bug: 1658571
Implements: blueprint fix-tag-attribute-disappearing
2017-01-30 19:38:46 -05:00
Kevin_Zheng
19809429e8 Fix misleading port delete description
After the fix of: https://review.openstack.org/#/c/126309
the pre-existed Neutron port that are attached to the
instance will not be deleted, the current description
is misleading.

Change-Id: Ibfd4bc2278911844e4b1c05e94b4e3c947365b75
2016-12-22 09:24:34 +08:00
int32bit
5eb8297f61 Add soft delete wrinkle to api-ref
The API reference for deleting a server is making the assumption that
the instance is going to be (hard) deleted from the system, but it
doesn't take into account the case that CONF.reclaim_instance_interval
is set, which if > 0 makes the API 'soft delete' the instance, so that
the instance's vm won't be deleted until the
CONF.reclaim_instance_interval has expired since the instance was soft
deleted. The instance marked as ``SOFT_DELETED`` can be recovered via
``restore`` action before it's really deleted from the system. We should
update the reference to talk about the soft deleted wrinkle so we can set
expectations.

Closes-Bug: #1650328

Change-Id: Ibbb1c225da11234aaac3634769db112a30dfef64
2016-12-21 02:39:02 +00:00
jichenjc
f853a5c4be Add description for 2.9 microversion
2.9 added locked param to view builder of servers
several actions are affected.

Rebuild action will be in another separated patch to
add whole response of rebuild action.

Change-Id: I366b5f43b971b4315f006d2b4a223de4fcaef78a
Implements: blueprint api-ref-in-rst-ocata
2016-11-28 22:26:08 +08:00
Ken'ichi Ohmichi
9a5c20af7f Add block_device_mapping_v2.uuid to api-ref
The sample of block_device_mapping_v2 contains uuid as a parameter
but there is not any explanation of the parameter.
This patch adds it to api-ref.

The following is for explaining the parameter from the code.

  As the following code, source_type is "image" and api_dict["image_id"]
  can be glance image-id on the sample case.

  https://github.com/openstack/nova/blob/master/nova/block_device.py#L197
    api_dict[source_type + '_id'] = device_uuid

  The "image_id" is used for getting image metadata from Glance:

  https://github.com/openstack/nova/blob/master/nova/compute/api.py#L1072
    image_id = bdm['image_id']
    image_meta = self.image_api.get(context, image_id)

Change-Id: I83badab07446c2b1e55cc3b29a3ba9476efc179d
2016-12-01 19:15:14 -08:00
Jenkins
224773def4 Merge "Optional name in Update Server description in api-ref" 2016-12-01 03:37:59 +00:00
Karen Bradshaw
dc1433be08 [api-ref] Minor text clean-up, formatting
- Cleaned up some wording, and formatted
  two rst notes.
- Moved cloudpipe.inc in index.rst to be located
  with other deprecated apis.

Change-Id: Ic3740540e8cc626110c77214acf87338e1abdd76
2016-11-29 12:31:46 -05:00
csatari
0c1e2fa28b Optional name in Update Server description in api-ref
In the description of Update Server the parameter name is not optional,
while it is optional. This is fixed by this patch.

Change-Id: I2a659c07caeee1a10b096f58c2e10aa7e8a0bf7a
Signed-off-by: csatari <gergely.csatari@nokia.com>
2016-11-28 12:41:21 +01:00
Jenkins
62412ad454 Merge "[api-ref]: Update link reference" 2016-09-14 16:50:30 +00:00
Jenkins
0f9de41cba Merge "[api-ref] fix availability_zone for server create" 2016-09-14 12:46:57 +00:00
ghanshyam
d7948387b1 Correct sort_key and sort_dir parameter for flavor
This commits define new parameter sort_key_flavor
and sort_dir_flavor for flavor List API and define
the correct default values for those.

Partially implements blueprint api-ref-in-rst

Change-Id: I2915a5bccebfeddf66c825b0272af86e3fd7da19
2016-09-13 08:28:26 +00:00
tengqm
73c4c001d6 [api-ref] fix availability_zone for server create
The 'availability_zone' parameter was incorrectly documented as
'os-availability-zone:availability_zone'. This patch fixes it.

Change-Id: I9837a747b40c9ef933a89acbdab9360ade1012a8
2016-09-12 05:47:47 -04:00
Ha Van Tu
b5073eb735 [api-ref]: Update link reference
This patch updates link reference for "create keypair" in
Compute API create server [1].
Current reference link:
http://developer.openstack.org/api-ref-compute-v2.1.html#createKeypair
http://developer.openstack.org/api-ref-compute-v2.1.html#createFloatingIP
http://developer.openstack.org/api-ref-compute-v2.1.html#addFloatingIp
http://developer.openstack.org/api-ref-compute-v2.1.html#removeFloatingIp
Update reference link:
http://developer.openstack.org/api-ref/compute/#create-or-import-keypair
http://developer.openstack.org/api-ref/compute
/#create-allocate-floating-ip-address
http://developer.openstack.org/api-ref/compute
/#delete-deallocate-floating-ip-address
[1] http://developer.openstack.org/api-ref/compute/?expanded=
create-server-detail#create-server

Change-Id: I421b559a7c127abb8c8c97d08b579bedb080bbe4
Closes-Bug: #1615948
2016-08-24 09:42:53 +07:00
Matt Riedemann
d727795d66 Add REST API support for get me a network
This adds the 2.37 microversion to the REST API for automatically
allocating a network, i.e. get me a network.

The majority of the changes to the REST API concern request
validation. 'networks' is now required in the server POST body
after this microversion. The 'auto' or 'none' special network
uuid values are used, but if specified, can not be specified
with any other requested network values.

The other special case that is checked is when the minimum
compute service version is not new enough to support this change,
i.e. a Mitaka compute will not have the network API code that
knows how to deal with the special auto/none network IDs. Because
the REST API is checking the service version, the service caches
the service version after the first check. Once all computes are
updated to Newton then a restart of the nova-api service(s) will
be required to flush the cache. A release note is provided for
this situation.

The api-ref docs are also updated for this microversion including
an example API sample request.

The matching Tempest change to test this is here:

I89b18709e0cfbbcbf9be96a91a13a1356cdf85b0

The matching python-novaclient change is here:

I6636ddcd3be7bf393d2d69cc6c1ba5c7d65ff674

Implements blueprint get-me-a-network

Change-Id: I89b18709e0cfbbcbf9be96a91a13a1356cdf85b0
2016-08-15 14:10:42 -04:00
Jenkins
286046b537 Merge "Fixed typos in api-ref and releasenotes directory" 2016-07-29 20:25:36 +00:00
Alex Szarka
2a1aad9de7 Fixed typos in api-ref and releasenotes directory
This patchset fixes the typo errors in api-ref and
releasenotes directories.
TrivialFix

Change-Id: Ib72e5c4ac7539c1b08adc858b9b3a0071cb3c866
2016-07-20 09:08:50 +00:00
Jenkins
3f6ae25b27 Merge "api-ref: merge multiple create to servers.inc" 2016-07-19 01:50:38 +00:00
Sean Dague
039d0628a4 api-ref: merge multiple create to servers.inc
This creates a new way to describe multiple create as a dedicated
create call in the normal servers list. It only lists additional
parameters so that we're not copy / pasting between the 2 lists.

Part of bp:api-ref-in-rst

Change-Id: Ib15f224cf6a9432ae638c8b57a2156cd7b98215d
2016-07-04 13:57:18 +00:00
Artom Lifshitz
e83e114e1b Device tagging API support
This patch allows the user to specify a tag for a virtual network
interface and/or block device mapping when booting an instance.

Implements: blueprint bp/virt-device-role-tagging
Change-Id: I89247200f4cf1f644daf476727b4a6acb22b0cf6
2016-06-29 20:55:16 -07:00