Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions doc/source/cli/dms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,24 @@ Group operations
.. autoprogram-cliff:: openstack.dms.v1
:command: dms group *

.. _dms_quota:
.. _dms_instance:

Quota operations
----------------
Instance operations
-------------------

.. autoprogram-cliff:: openstack.dms.v1
:command: dms instance *

.. _dms_misq:

Misc operations
---------------

.. autoprogram-cliff:: openstack.dms.v1
:command: dms az list

.. autoprogram-cliff:: openstack.dms.v1
:command: dms maintenance window list

.. autoprogram-cliff:: openstack.dms.v1
:command: dms quota *
:command: dms product list
10 changes: 7 additions & 3 deletions doc/source/sdk/proxies/dms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ Message Group Operations
:noindex:
:members: groups, create_group, delete_group

DMS Quota Operations
^^^^^^^^^^^^^^^^^^^^
Instance Operations
^^^^^^^^^^^^^^^^^^^

.. autoclass:: otcextensions.sdk.dms.v1._proxy.Proxy
:noindex:
:members: quotas
:members: instances, find_instance, get_instance,
create_instance, update_instance, delete_instance,
delete_batch, restart_instance, delete_failed,
topics, create_topic, delete_topic,
availability_zones, products, maintenance_windows
5 changes: 3 additions & 2 deletions doc/source/sdk/resources/dms/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ DMS Resources
:maxdepth: 1

v1/group
v1/group_message
v1/message
v1/queue
v1/quota
v1/instance
v1/topic
v1/misc
13 changes: 0 additions & 13 deletions doc/source/sdk/resources/dms/v1/group_message.rst

This file was deleted.

13 changes: 13 additions & 0 deletions doc/source/sdk/resources/dms/v1/instance.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
otcextensions.sdk.dcs.v1.instance
=================================

.. automodule:: otcextensions.sdk.dms.v1.instance

The DMS Instance Class
----------------------

The ``Instance`` class inherits from
:class:`~otcextensions.sdk.sdk_resource.Resource`.

.. autoclass:: otcextensions.sdk.dms.v1.instance.Instance
:members:
41 changes: 41 additions & 0 deletions doc/source/sdk/resources/dms/v1/misc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
otcextensions.sdk.dcs.v1.az
===========================

.. automodule:: otcextensions.sdk.dms.v1.az

The DMS Availability Zone Class
-------------------------------

The ``AvailabilityZone`` class inherits from
:class:`~otcextensions.sdk.sdk_resource.Resource`.

.. autoclass:: otcextensions.sdk.dms.v1.az.AvailabilityZone
:members:

otcextensions.sdk.dcs.v1.product
================================

.. automodule:: otcextensions.sdk.dms.v1.product

The DMS Product Spec Class
--------------------------

The ``Product`` class inherits from
:class:`~otcextensions.sdk.sdk_resource.Resource`.

.. autoclass:: otcextensions.sdk.dms.v1.product.Product
:members:

otcextensions.sdk.dcs.v1.maintenance_window
===========================================

.. automodule:: otcextensions.sdk.dms.v1.maintenance_window

The DMS Maintenance window Class
--------------------------------

The ``MaintenanceWindow`` class inherits from
:class:`~otcextensions.sdk.sdk_resource.Resource`.

.. autoclass:: otcextensions.sdk.dms.v1.maintenance_window.MaintenanceWindow
:members:
41 changes: 41 additions & 0 deletions doc/source/sdk/resources/dms/v1/misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
otcextensions.sdk.dcs.v1.az
===========================

.. automodule:: otcextensions.sdk.dms.v1.az

The DMS Availability Zone Class
-------------------------------

The ``AvailabilityZone`` class inherits from
:class:`~otcextensions.sdk.sdk_resource.Resource`.

.. autoclass:: otcextensions.sdk.dms.v1.az.AvailabilityZone
:members:

otcextensions.sdk.dcs.v1.product
================================

.. automodule:: otcextensions.sdk.dms.v1.product

The DMS Product Spec Class
--------------------------

The ``Product`` class inherits from
:class:`~otcextensions.sdk.sdk_resource.Resource`.

.. autoclass:: otcextensions.sdk.dms.v1.product.Product
:members:

otcextensions.sdk.dcs.v1.maintenance_window
===========================================

.. automodule:: otcextensions.sdk.dms.v1.maintenance_window

The DMS Maintenance window Class
--------------------------------

The ``MaintenanceWindow`` class inherits from
:class:`~otcextensions.sdk.sdk_resource.Resource`.

.. autoclass:: otcextensions.sdk.dms.v1.maintenance_window.MaintenanceWindow
:members:
13 changes: 0 additions & 13 deletions doc/source/sdk/resources/dms/v1/quota.rst

This file was deleted.

13 changes: 13 additions & 0 deletions doc/source/sdk/resources/dms/v1/topic.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
otcextensions.sdk.dcs.v1.topic
==============================

.. automodule:: otcextensions.sdk.dms.v1.topic

The DMS Instance topic Class
----------------------------

The ``Topic`` class inherits from
:class:`~otcextensions.sdk.sdk_resource.Resource`.

.. autoclass:: otcextensions.sdk.dms.v1.topic.Topic
:members:
38 changes: 38 additions & 0 deletions otcextensions/osclient/dms/v1/az.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
'''DMS Instance AZ action implementations'''
from osc_lib import utils
from osc_lib.command import command

from otcextensions.i18n import _


class ListAZ(command.Lister):
_description = _('List Availability zones')
columns = ('ID', 'name', 'code', 'port', 'has_available_resources')

def get_parser(self, prog_name):
parser = super(ListAZ, self).get_parser(prog_name)

return parser

def take_action(self, parsed_args):
client = self.app.client_manager.dms

data = client.availability_zones()

table = (self.columns,
(utils.get_item_properties(
s, self.columns,
) for s in data))
return table
Loading