Skip to content

Commit 115a351

Browse files
authored
Extend DMS to cover Kafka Premium extensions (#76)
Extend DMS to cover Kafka Premium extensions Reviewed-by: https://github.com/apps/otc-zuul
1 parent a18ac58 commit 115a351

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+3558
-424
lines changed

doc/source/cli/dms.rst

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,24 @@ Group operations
2626
.. autoprogram-cliff:: openstack.dms.v1
2727
:command: dms group *
2828

29-
.. _dms_quota:
29+
.. _dms_instance:
3030

31-
Quota operations
32-
----------------
31+
Instance operations
32+
-------------------
33+
34+
.. autoprogram-cliff:: openstack.dms.v1
35+
:command: dms instance *
36+
37+
.. _dms_misq:
38+
39+
Misc operations
40+
---------------
41+
42+
.. autoprogram-cliff:: openstack.dms.v1
43+
:command: dms az list
44+
45+
.. autoprogram-cliff:: openstack.dms.v1
46+
:command: dms maintenance window list
3347

3448
.. autoprogram-cliff:: openstack.dms.v1
35-
:command: dms quota *
49+
:command: dms product list

doc/source/sdk/proxies/dms.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ Message Group Operations
2525
:noindex:
2626
:members: groups, create_group, delete_group
2727

28-
DMS Quota Operations
29-
^^^^^^^^^^^^^^^^^^^^
28+
Instance Operations
29+
^^^^^^^^^^^^^^^^^^^
3030

3131
.. autoclass:: otcextensions.sdk.dms.v1._proxy.Proxy
3232
:noindex:
33-
:members: quotas
33+
:members: instances, find_instance, get_instance,
34+
create_instance, update_instance, delete_instance,
35+
delete_batch, restart_instance, delete_failed,
36+
topics, create_topic, delete_topic,
37+
availability_zones, products, maintenance_windows

doc/source/sdk/resources/dms/index.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ DMS Resources
55
:maxdepth: 1
66

77
v1/group
8-
v1/group_message
98
v1/message
109
v1/queue
11-
v1/quota
10+
v1/instance
11+
v1/topic
12+
v1/misc

doc/source/sdk/resources/dms/v1/group_message.rst

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
otcextensions.sdk.dcs.v1.instance
2+
=================================
3+
4+
.. automodule:: otcextensions.sdk.dms.v1.instance
5+
6+
The DMS Instance Class
7+
----------------------
8+
9+
The ``Instance`` class inherits from
10+
:class:`~otcextensions.sdk.sdk_resource.Resource`.
11+
12+
.. autoclass:: otcextensions.sdk.dms.v1.instance.Instance
13+
:members:

doc/source/sdk/resources/dms/v1/misc

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
otcextensions.sdk.dcs.v1.az
2+
===========================
3+
4+
.. automodule:: otcextensions.sdk.dms.v1.az
5+
6+
The DMS Availability Zone Class
7+
-------------------------------
8+
9+
The ``AvailabilityZone`` class inherits from
10+
:class:`~otcextensions.sdk.sdk_resource.Resource`.
11+
12+
.. autoclass:: otcextensions.sdk.dms.v1.az.AvailabilityZone
13+
:members:
14+
15+
otcextensions.sdk.dcs.v1.product
16+
================================
17+
18+
.. automodule:: otcextensions.sdk.dms.v1.product
19+
20+
The DMS Product Spec Class
21+
--------------------------
22+
23+
The ``Product`` class inherits from
24+
:class:`~otcextensions.sdk.sdk_resource.Resource`.
25+
26+
.. autoclass:: otcextensions.sdk.dms.v1.product.Product
27+
:members:
28+
29+
otcextensions.sdk.dcs.v1.maintenance_window
30+
===========================================
31+
32+
.. automodule:: otcextensions.sdk.dms.v1.maintenance_window
33+
34+
The DMS Maintenance window Class
35+
--------------------------------
36+
37+
The ``MaintenanceWindow`` class inherits from
38+
:class:`~otcextensions.sdk.sdk_resource.Resource`.
39+
40+
.. autoclass:: otcextensions.sdk.dms.v1.maintenance_window.MaintenanceWindow
41+
:members:
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
otcextensions.sdk.dcs.v1.az
2+
===========================
3+
4+
.. automodule:: otcextensions.sdk.dms.v1.az
5+
6+
The DMS Availability Zone Class
7+
-------------------------------
8+
9+
The ``AvailabilityZone`` class inherits from
10+
:class:`~otcextensions.sdk.sdk_resource.Resource`.
11+
12+
.. autoclass:: otcextensions.sdk.dms.v1.az.AvailabilityZone
13+
:members:
14+
15+
otcextensions.sdk.dcs.v1.product
16+
================================
17+
18+
.. automodule:: otcextensions.sdk.dms.v1.product
19+
20+
The DMS Product Spec Class
21+
--------------------------
22+
23+
The ``Product`` class inherits from
24+
:class:`~otcextensions.sdk.sdk_resource.Resource`.
25+
26+
.. autoclass:: otcextensions.sdk.dms.v1.product.Product
27+
:members:
28+
29+
otcextensions.sdk.dcs.v1.maintenance_window
30+
===========================================
31+
32+
.. automodule:: otcextensions.sdk.dms.v1.maintenance_window
33+
34+
The DMS Maintenance window Class
35+
--------------------------------
36+
37+
The ``MaintenanceWindow`` class inherits from
38+
:class:`~otcextensions.sdk.sdk_resource.Resource`.
39+
40+
.. autoclass:: otcextensions.sdk.dms.v1.maintenance_window.MaintenanceWindow
41+
:members:

doc/source/sdk/resources/dms/v1/quota.rst

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
otcextensions.sdk.dcs.v1.topic
2+
==============================
3+
4+
.. automodule:: otcextensions.sdk.dms.v1.topic
5+
6+
The DMS Instance topic Class
7+
----------------------------
8+
9+
The ``Topic`` class inherits from
10+
:class:`~otcextensions.sdk.sdk_resource.Resource`.
11+
12+
.. autoclass:: otcextensions.sdk.dms.v1.topic.Topic
13+
:members:

otcextensions/osclient/dms/v1/az.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
2+
# not use this file except in compliance with the License. You may obtain
3+
# a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+
# License for the specific language governing permissions and limitations
11+
# under the License.
12+
#
13+
'''DMS Instance AZ action implementations'''
14+
from osc_lib import utils
15+
from osc_lib.command import command
16+
17+
from otcextensions.i18n import _
18+
19+
20+
class ListAZ(command.Lister):
21+
_description = _('List Availability zones')
22+
columns = ('ID', 'name', 'code', 'port', 'has_available_resources')
23+
24+
def get_parser(self, prog_name):
25+
parser = super(ListAZ, self).get_parser(prog_name)
26+
27+
return parser
28+
29+
def take_action(self, parsed_args):
30+
client = self.app.client_manager.dms
31+
32+
data = client.availability_zones()
33+
34+
table = (self.columns,
35+
(utils.get_item_properties(
36+
s, self.columns,
37+
) for s in data))
38+
return table

0 commit comments

Comments
 (0)