524 Commits

Author SHA1 Message Date
Zuul
bec0aab9f7 Merge "Update api-ref" 2020-05-07 21:50:37 +00:00
Zuul
4ea245640b Merge "Automate generation of quotas api-ref samples" 2020-03-11 21:25:58 +00:00
Zuul
1d96403454 Merge "Automate generation of qos specs api-ref samples" 2020-03-11 21:19:02 +00:00
wanghao
7e98d14a57 Support to query volume filter by updated_at/created_at
Support users can query resources by specifying the time
that resources are created at or updated at with time
comparison operators: "gt/gte/eq/neq/lt/lte",
and cinder will return all which match the condition.

The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm.
The ±hh:mm value, if included, returns the time zone as an offset from UTC.

Add two filters updated_at and created_at in querying API.
"volumes/detail?created_at=gt:2016-01-01T01:00:00,lt:2016-12-31T01:00:00"

Change-Id: I1f43c37c2266e43146637beadc027ccf6dec017e
Partial-Implements: blueprint support-to-query-cinder-resources-filter-by-time-comparison-operators
Co-Authored-By: wangxiyuan <wangxiyuan@huawei.com>
2020-02-25 17:58:13 +08:00
Zuul
8fce844850 Merge "api-ref: give an example of volume['attachments']" 2020-02-12 00:13:31 +00:00
vrushti
7ad6ce7dd7 Change path to query in cinderAPI V3-volume delete
Cascade and force are part of query, not the path.

Closes: #1860134

Change-Id: Iacd69df2c10f83f286acc4b2a0f6d92f8f19caf2
2020-02-11 16:21:26 +00:00
Brian Rosmaita
d14807406a Update api-ref
Fix a typo and update the headings currently missing the resource
name (may seem redundant, but it's important because some have '_'
and some have '-' in the name).

Change-Id: I47bf40759b9f298dbdc2fcc59e0617d8b5f3fc0b
2020-02-04 18:41:30 -05:00
Matt Riedemann
589a74de2b api-ref: give an example of volume['attachments']
The API samples for GET /v3/{project_id}/volumes/detail and
GET /v3/{project_id}/volumes/{volume_id} have an empty attachments
field value and the parameter description does not give the actual
keys in the attachments list of dicts. This change gives an example
of what the volume attachments entry would look like with the actual
keys the caller should expect.

Change-Id: Ib3d7d54941ee98434297683a94d76fdab7788dee
2019-12-31 14:47:31 +00:00
Zuul
7066645d17 Merge "api-ref: add metadata parameter in the response of create-backup" 2019-10-14 20:56:46 +00:00
Zuul
51f853d126 Merge "[api-ref]Host name is not necessary to contain '@'" 2019-10-07 21:23:21 +00:00
whoami-rajat
de3f8e2bff Automate generation of quotas api-ref samples
This patch adds the following tests:
1) quota sets
2) quota classes

Change-Id: Ie52071c0b69b49eee340ebf4b06446e824c4b5fe
Partially-Implements: blueprint generating-sample-files
2019-09-30 16:29:49 +05:30
whoami-rajat
66638a0e78 Automate generation of qos specs api-ref samples
This patch adds the following tests:
1) limits
2) qos specifications

Change-Id: I1c4c7ea0f08469395bea1091c8f71ccc3b62c01d
Partially-Implements: blueprint generating-sample-files
2019-09-27 17:43:40 +05:30
whoami-rajat
a550ade303 Untyped to Default Volume Type
The patch adds the following functionality:
* A default volume type (``__DEFAULT__``) will be
  created during cinder DB migration.
* Admins can override the default type in cinder.conf
* Creating a new volume without any type (and
  `default_volume_type` option is unset in cinder.conf)
  will be assigned the ``__DEFAULT__`` type.
* The default volume type cannot be deleted
* All untyped volumes and snapshots will be migrated to the
  ``__DEFAULT__`` type.

Change-Id: I4da0c13b5b3f8174a30b8557f968d6b9e641b091
Implements: blueprint untyped-volumes-default-volume-type
2019-09-20 05:37:54 +00:00
Zuul
5d8242cd54 Merge "[api-ref]Fix response example file of update_type" 2019-09-05 00:02:04 +00:00
zhufl
6ff2c4a1d1 [api-ref]Host name is not necessary to contain '@'
As shown in https://zuul.opendev.org/t/openstack/build/e39652d2dc8f4cb394933da8f9a9bb59/log/job-output.txt,
host name may contain '@', but not necessary to contain '@',
like:
Request (VolumeHostsV3RbacTest:test_show_host):
200 GET https://10.208.227.163/volume/v3/67d6a092ee7d4cd4a6b3ae37812bec50/os-hosts/ubuntu-bionic-rax-dfw-0010673901
Response Body: {"host":
                 [{"resource":
                   {"volume_count": "2", "total_volume_gb": "2",
                    "total_snapshot_gb": "1", "project": "(total)",
                    "host": "ubuntu-bionic-rax-dfw-0010673901",
                    "snapshot_count": "1"}},
                  {"resource":
                   {"volume_count": "1", "total_volume_gb": "1",
                     "total_snapshot_gb": "0",
                     "project": "2aba5d9825ac47a7b8c3ea805af34a75",
                     "host": "ubuntu-bionic-rax-dfw-0010673901",
                     "snapshot_count": "0"}}}

Besides, the format 'host@backend' should be that of host_name_backend,
not host.

Change-Id: Id2c0be1e4d0471686674ef781b722087638c4c50
2019-09-04 10:03:58 +08:00
zhufl
311b89ce1f [api-ref]Fix response example file of update_type
The response sample of "Update a volume type" interface refers to
that of "Show volume type detail", which is not the same.
So this is to add a functional test to generate the update volume
type response sample of "Update a volume type" own.

https://docs.openstack.org/api-ref/block-storage/v3/index.html#update-a-volume-type

Change-Id: I4e5bc87c6ab20ef6b85e0511d3965e7b1f4893ca
partially-implements: blueprint volume-response-schema-validation
2019-08-23 14:50:27 +08:00
zhufl
d4f1e57257 [api-ref]Fix values of service-status in list-hosts
In "List all hosts for a project", service-status should take
the values of ['available', 'unavailable'], (service-state takes
the value of ['enabled', 'disabled']), and because os-services API
uses service_status which requires returning `enabled` and `disabled`,
we need add a new parameter host_service_status for os-hosts API.

https://docs.openstack.org/api-ref/block-storage/v3/index.html#list-all-hosts-for-a-project
partially-implements: blueprint volume-response-schema-validation

Change-Id: Idde4a63f00862599a13bcfcdadc1d4459f27d3a4
2019-08-23 09:41:37 +08:00
zhufl
ecb30366a8 api-ref: add metadata parameter in the response of create-backup
The "Response Example" of "Create a backup" contains metadata, but
"Response Parameters" not, this is to add it.

https://docs.openstack.org/api-ref/block-storage/v3/index.html?expanded=create-a-backup-detail#id430

Change-Id: Ic6196394f17b955b94eb6215d8651b86b59d6edf
2019-08-14 15:40:47 +08:00
Andreas Jaeger
af04cc3392 Update docs building
Cleanup doc/requirements to just use what is needed for doc building.
Move reno to doc/requirements, add doc8 to test-requirements.

update tox.ini:
* doc8 should be in pep8 as linter and not docs according to PTI [1]
* Only build main doc in docs environment, CI uses this and we waste
  just time building api-ref as well, there's a separate environment for
  this. This follows PTI [1]
* Do not include requirements file for docs building, it's not needed
  with apidoc.
* Use common deps for all docs build environments.

Cleanup doc/source/conf.py, with the switch to api-doc a lot of settings
are not needed anymore, also the eventlet bug is fixed.

Update openstackdocstheme to 1.20.0 and which allows to remove obsolete
setting of html_last_updated_fmt, project, latex_elements from conf.py.

Add doc8 to lower-constraints to make requirments-check happy.

[1] https://governance.openstack.org/tc/reference/project-testing-interface.html#documentation

Change-Id: If86dd619402495d9d4470b14cb270fcf53db6794
2019-08-10 11:41:14 +02:00
Sean McGinnis
c3d7880ed6
Cleanup api-ref sample files
Updates have been made to the api-ref sample files where some of them
have been moved under subdirectories to better organize things. A few of
the old files were left behind in doing this, and a few were added
without updating the files that referenced them. This cleans a few of
those cases up.

Change-Id: I58c8f2f2e533476385f1ec510fe04e31bceb64cc
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-07-03 13:22:33 -05:00
Zuul
4f3e7c0c34 Merge "Add OS-SCH-HNT in extensions list" 2019-06-07 23:13:58 +00:00
whoami-rajat
9a5bdb308a Add OS-SCH-HNT in extensions list
To have backward compatibility with MV 3.53, we need to include
OS-SCH-HNT in the ``cinder list-extensions`` response.

Change-Id: I9da1af4ac6df1d033a9baaba77135b329c87e6f8
Closes-Bug: #1831623
2019-06-07 08:38:06 +05:30
Zuul
c33359e4b1 Merge "api-ref: mark migration_status parameter as optional" 2019-05-30 17:47:29 +00:00
Zuul
a8d0c20c24 Merge "Automate generation of volume transfer api-ref samples" 2019-05-30 17:47:25 +00:00
Brian Rosmaita
c7d92f456f Correct typo in api-ref
The 'os-' prefix is incorrectly written as 'is-' in one place (yes,
I checked, doesn't seem to occur anywhere else).

Change-Id: I02d1401314c9219f3f61c423dbc5b68044263105
2019-05-10 15:16:20 -04:00
Matt Riedemann
c549325bd2 api-ref: mark migration_status parameter as optional
Everything that goes through the volumes view builder
detail() method has a strict is_admin check on returning
the migration_status parameter [1]. This means the
migration_status parameter in the API reference should
be optional since it's admin-only and not always shown.

This fixes the v2 and v3 API references for showing,
creating, updating, resetting the status of, and creating
from a managed volume. As a result, the parameter for a
required migration_status parameter is unused and removed.

Note that there is no strict policy check on the
migration_status request parameter when resetting a volume's
status, but the action itself is admin-only by default
using the volume_extension:volume_admin_actions:reset_status
policy rule.

[1] https://opendev.org/openstack/cinder/src/tag/14.0.0/cinder/api/v2/views/volumes.py#L94

Change-Id: I82308dc1a6aaf039b675a17e19747f11be574209
Closes-Bug: #1828113
2019-05-09 09:31:02 -04:00
whoami-rajat
4e8ed9d5c0 Automate generation of volume transfer api-ref samples
This patch adds the following tests:
1) Volume transfer
2) Snapshot manage extensions

Change-Id: I6be1ca51ba29513fd9b1abe2791a7bb5815e20a3
Partially-Implements: blueprint generating-sample-files
2019-03-20 16:05:20 +05:30
Zuul
d8f681dcef Merge "Automate generation of snapshots api-ref samples" 2019-03-16 21:48:21 +00:00
Zuul
9df7837ea7 Merge "Automate generation of volume actions api-ref samples" 2019-03-16 19:34:27 +00:00
whoami-rajat
51a55ab03d Automate generation of snapshots api-ref samples
This patch adds the tests for generating api-ref responses of
volume snapshots.

Change-Id: I1b8f265e2efd1760b34baf32d9d92cb4b2777cdd
Partially-Implements: blueprint generating-sample-files
2019-03-12 12:07:01 +05:30
Zuul
d11d7ba3fe Merge "Add project_id in group snapshots list and show API" 2019-03-05 05:55:51 +00:00
whoami-rajat
6dd3b9c51f Add project_id in group snapshots list and show API
Add ``project_id`` to response body of list group snapshots
with detail and show group snapshot detail APIs.

Merging the group and group snapshot response in same MV
was discussed in weekly meeting[1].

[1] http://eavesdrop.openstack.org/meetings/cinder/2019/cinder.2019-02-20-16.00.log.html#l-122
Change-Id: Ided66450b5d7de32551edbce249e94f6174da2eb
Implements: blueprint add-project-id-to-group-groupsnapshot-response
2019-03-01 22:59:19 +05:30
Zuul
019d1e9dd6 Merge "[api-ref] Fix the parameter of image metadata" 2019-02-28 16:58:09 +00:00
zhangbailin
f54964d520 api-ref: add qos_specs_id to show default volume type response
https://developer.openstack.org/api-ref/block-storage/v3/?expanded=update-extra-specification-for-volume-type-detail,delete-extra-specification-for-volume-type-detail,show-volume-type-detail-detail,show-default-volume-type-detail,show-extra-specification-for-volume-type-detail,show-all-extra-specifications-for-volume-type-detail,create-or-update-extra-specs-for-volume-type-detail,update-a-volume-type-detail#show-default-volume-type

Change-Id: Ia097263b2354534fc77f229cc257bc8de8dd51dc
2019-02-25 06:18:48 +00:00
Zuul
77c6f1010c Merge "Doc8: Stop skipping D001: Line too long" 2019-02-23 22:39:37 +00:00
Zuul
ca4e634ede Merge "docs: Add os-migrate_volume_completion api-ref" 2019-02-21 18:00:46 +00:00
Lee Yarwood
71ca8578be docs: Add os-migrate_volume_completion api-ref
This admin API is only called externally by Nova at present when
finishing the migration or retype of an attached volume. However for
future reference it would be really useful to have this listed in the
official API reference guide.

Change-Id: I5fad6eb4903784870aa26fa0996a391bbbbb9276
2019-02-20 11:40:30 +00:00
Sean McGinnis
d5b539be36
Doc8: Stop skipping D001: Line too long
This cleans up the cases where we had D001 violations so we can stop
skipping that check in doc8 runs.

Change-Id: Ie52f6ecac1a645fcbcc643b9ca63e033b622d830
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-02-19 16:51:56 -06:00
Sean McGinnis
b6f9932f9c
Include .inc files in doc8 linting
We use *.inc files extensively, especially in the api-ref, but these
files are not covered by default with our doc8 validation.

This adds support for those files and fixes a few issues that were
identified after enabling coverage.

Change-Id: I807823f3cb44274c3940db55e901d434304a09f5
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-02-19 11:33:05 -06:00
whoami-rajat
15d1a00a57 Automate generation of volume actions api-ref samples
This patch adds the following tests:

1) Volume actions
2) Volume manage extensions

Change-Id: I7f27a336a6735f4d346cc47c983dfee55f47f55d
Partially-Implements: blueprint generating-sample-files
2019-02-08 01:13:03 +05:30
Zuul
3902a2bf28 Merge "api-ref: Correct response body type for show host details" 2019-02-06 23:25:01 +00:00
Zuul
e10f524529 Merge "Automate generation of volumes api-ref samples" 2019-02-06 19:28:36 +00:00
Zuul
a714ac1ec1 Merge "api-ref: modify 'keys' description" 2019-02-05 23:17:54 +00:00
TommyLike
311c5153bc Support transfer pagination
This patch adds support for transfer pagination.

Co-Authored-By: Yikun Jiang <yikunkero@gmail.com>

Closes-bug: #1814195

Change-Id: Idb04f783b2287b2b45d626131648b0005a232fbe
2019-02-01 10:44:23 +08:00
whoami-rajat
b079d1a022 Add project_id in group list and show API
Add ``project_id`` to response body of list groups with detail and show
group detail APIs.

Depends-On: I190cc67a001ffce2a533480e6e39e26cd3f981df
Change-Id: I3bc34a30b02f8a1ec2c5fecbcde6bd369c8e4a76
Implements: blueprint add-project-id-to-group-response
2019-01-30 13:20:58 +05:30
zhangbailin
c15a32aba7 api-ref: Add cipher to update an encryption type interface
Change-Id: I76b6d1f155e912a87c0ca157df3dcbbe59946800
2019-01-27 19:04:48 -05:00
Zuul
9cc474baa7 Merge "api-ref: fix response example of list-backups" 2019-01-24 13:05:21 +00:00
Zuul
7ac5101d1d Merge "api-ref: add response body for set-image-metadata-for-a-volume" 2019-01-24 11:17:25 +00:00
Zuul
ee9cf86967 Merge "Improve volume transfer records" 2019-01-22 13:25:45 +00:00
Zuul
5117ce1cab Merge "api-ref: volume_type_access should be array instead of object" 2019-01-15 01:55:39 +00:00