Skip to content

Commit

Permalink
[AutoPR cosmos-db/resource-manager] Adding cassandra connector proper…
Browse files Browse the repository at this point in the history
…ties for cosmos db C* account - (#6231)

* Generated from 77190f2dc72106f5ff53ae7617312f90b5b1504b

Adding cassandra connector properties for cosmos db C* account -
enableCassandraConnector - This property, if set to true, will trigger the creation of the cassandra connector CCX pipeline which relicates data from native cassandra nodes to cosmos db C* account
connectorOffer - This property specifies the type of connector offer which will vary based on the data size of the native cassandra cluster
Validations -
        Validated cosmos-db.json with autorest from https://github.com/Azure/azure-rest-api-specs/tree/master/specification/cosmos-db/resource-manager
        Validated using the online schema validator - https://json-schema-validator.herokuapp.com

* Packaging update of azure-mgmt-cosmosdb
  • Loading branch information
AutorestCI authored and Zim Kalinowski committed Aug 15, 2019
1 parent 30744b1 commit ed764f7
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-mgmt-cosmosdb/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure Cosmos DB Management Client Library.
Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
DatabaseAccountKind,
DatabaseAccountOfferType,
DefaultConsistencyLevel,
ConnectorOffer,
IndexingMode,
DataType,
IndexKind,
Expand Down Expand Up @@ -288,6 +289,7 @@
'DatabaseAccountKind',
'DatabaseAccountOfferType',
'DefaultConsistencyLevel',
'ConnectorOffer',
'IndexingMode',
'DataType',
'IndexKind',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ class DefaultConsistencyLevel(str, Enum):
consistent_prefix = "ConsistentPrefix"


class ConnectorOffer(str, Enum):

small = "Small"


class IndexingMode(str, Enum):

consistent = "Consistent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ class DatabaseAccount(Resource):
:param enable_multiple_write_locations: Enables the account to write in
multiple locations
:type enable_multiple_write_locations: bool
:param enable_cassandra_connector: Enables the cassandra connector on the
Cosmos DB C* account
:type enable_cassandra_connector: bool
:param connector_offer: The cassandra connector offer type for the Cosmos
DB database C* account. Possible values include: 'Small'
:type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer
"""

_validation = {
Expand Down Expand Up @@ -111,6 +117,8 @@ class DatabaseAccount(Resource):
'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'},
'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'},
'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -129,3 +137,5 @@ def __init__(self, **kwargs):
self.failover_policies = None
self.virtual_network_rules = kwargs.get('virtual_network_rules', None)
self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None)
self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None)
self.connector_offer = kwargs.get('connector_offer', None)
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ class DatabaseAccountCreateUpdateParameters(Resource):
:param enable_multiple_write_locations: Enables the account to write in
multiple locations
:type enable_multiple_write_locations: bool
:param enable_cassandra_connector: Enables the cassandra connector on the
Cosmos DB C* account
:type enable_cassandra_connector: bool
:param connector_offer: The cassandra connector offer type for the Cosmos
DB database C* account. Possible values include: 'Small'
:type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer
"""

_validation = {
Expand All @@ -92,6 +98,8 @@ class DatabaseAccountCreateUpdateParameters(Resource):
'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'},
'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'},
'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'},
}

database_account_offer_type = "Standard"
Expand All @@ -107,3 +115,5 @@ def __init__(self, **kwargs):
self.capabilities = kwargs.get('capabilities', None)
self.virtual_network_rules = kwargs.get('virtual_network_rules', None)
self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None)
self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None)
self.connector_offer = kwargs.get('connector_offer', None)
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ class DatabaseAccountCreateUpdateParameters(Resource):
:param enable_multiple_write_locations: Enables the account to write in
multiple locations
:type enable_multiple_write_locations: bool
:param enable_cassandra_connector: Enables the cassandra connector on the
Cosmos DB C* account
:type enable_cassandra_connector: bool
:param connector_offer: The cassandra connector offer type for the Cosmos
DB database C* account. Possible values include: 'Small'
:type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer
"""

_validation = {
Expand All @@ -92,11 +98,13 @@ class DatabaseAccountCreateUpdateParameters(Resource):
'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'},
'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'},
'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'},
}

database_account_offer_type = "Standard"

def __init__(self, *, locations, location: str=None, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, **kwargs) -> None:
def __init__(self, *, locations, location: str=None, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, **kwargs) -> None:
super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs)
self.kind = kind
self.consistency_policy = consistency_policy
Expand All @@ -107,3 +115,5 @@ def __init__(self, *, locations, location: str=None, tags=None, kind="GlobalDocu
self.capabilities = capabilities
self.virtual_network_rules = virtual_network_rules
self.enable_multiple_write_locations = enable_multiple_write_locations
self.enable_cassandra_connector = enable_cassandra_connector
self.connector_offer = connector_offer
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ class DatabaseAccount(Resource):
:param enable_multiple_write_locations: Enables the account to write in
multiple locations
:type enable_multiple_write_locations: bool
:param enable_cassandra_connector: Enables the cassandra connector on the
Cosmos DB C* account
:type enable_cassandra_connector: bool
:param connector_offer: The cassandra connector offer type for the Cosmos
DB database C* account. Possible values include: 'Small'
:type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer
"""

_validation = {
Expand Down Expand Up @@ -111,9 +117,11 @@ class DatabaseAccount(Resource):
'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'},
'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'},
'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'},
}

def __init__(self, *, location: str=None, tags=None, kind="GlobalDocumentDB", provisioning_state: str=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, consistency_policy=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, **kwargs) -> None:
def __init__(self, *, location: str=None, tags=None, kind="GlobalDocumentDB", provisioning_state: str=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, consistency_policy=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, **kwargs) -> None:
super(DatabaseAccount, self).__init__(location=location, tags=tags, **kwargs)
self.kind = kind
self.provisioning_state = provisioning_state
Expand All @@ -129,3 +137,5 @@ def __init__(self, *, location: str=None, tags=None, kind="GlobalDocumentDB", pr
self.failover_policies = None
self.virtual_network_rules = virtual_network_rules
self.enable_multiple_write_locations = enable_multiple_write_locations
self.enable_cassandra_connector = enable_cassandra_connector
self.connector_offer = connector_offer
1 change: 0 additions & 1 deletion sdk/cosmos/azure-mgmt-cosmosdb/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
Expand Down

0 comments on commit ed764f7

Please sign in to comment.