New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding cosmos db account module #47181

Open
wants to merge 41 commits into
base: devel
from

Conversation

Projects
None yet
5 participants
@zikalino
Contributor

zikalino commented Oct 17, 2018

SUMMARY

Adding Azure Cosmos DB Account module

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

azure_rm_cosmosdbaccount

ANSIBLE VERSION

2.7

ADDITIONAL INFORMATION
@ansibot

This comment has been minimized.

Contributor

ansibot commented Oct 17, 2018

Hi @zikalino, thank you for submitting this pull-request!

click here for bot help

@ansibot

This comment has been minimized.

@ansibot

This comment has been minimized.

Contributor

ansibot commented Oct 17, 2018

@zikalino

This comment has been minimized.

Contributor

zikalino commented Oct 18, 2018

@mattclay I have encountered following error:
Error creating the Database Account instance: Azure Error: MissingSubscriptionRegistration\nMessage: The subscription is not registered to use namespace 'Microsoft.DocumentDB'

could you pls add DocumentDB?

@mattclay

This comment has been minimized.

Member

mattclay commented Oct 18, 2018

@zikalino Registered.

@zikalino

This comment has been minimized.

Contributor

zikalino commented Oct 18, 2018

@mattclay thanks!

@zikalino zikalino closed this Oct 18, 2018

@zikalino zikalino reopened this Oct 18, 2018

@ansibot ansibot added stale_ci and removed stale_ci labels Oct 26, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Nov 12, 2018

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py:326:33: E124 closing bracket does not match visual indentation

click here for bot help

@ansibot ansibot added the ci_verified label Nov 12, 2018

@ansibot ansibot removed the ci_verified label Nov 12, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Nov 12, 2018

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py:312:34: E126 continuation line over-indented for hanging indent
lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py:326:33: E126 continuation line over-indented for hanging indent

click here for bot help

@ansibot ansibot added the ci_verified label Nov 12, 2018

@ansibot ansibot removed the ci_verified label Nov 12, 2018

@ansibot ansibot added the stale_ci label Nov 23, 2018

@ansibot ansibot removed the stale_ci label Nov 28, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Nov 28, 2018

The test ansible-test sanity --test pep8 [explain] failed with 6 errors:

lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py:223:33: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py:224:33: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py:225:33: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py:226:33: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py:299:55: E127 continuation line over-indented for visual indent
lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py:300:55: E127 continuation line over-indented for visual indent

The test ansible-test sanity --test validate-modules [explain] failed with 2 errors:

lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py:0:0: E305 DOCUMENTATION.options.consistency_policy.suboptions.max_interval_in_seconds.type: not a valid value for dictionary value @ data['options']['consistency_policy']['suboptions']['max_interval_in_seconds']['type']. Got 'number'
lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py:0:0: E305 DOCUMENTATION.options.consistency_policy.suboptions.max_staleness_prefix.type: not a valid value for dictionary value @ data['options']['consistency_policy']['suboptions']['max_staleness_prefix']['type']. Got 'number'

click here for bot help

@zikalino zikalino changed the title from [WIP] adding cosmos db account module to adding cosmos db account module Nov 29, 2018

@ansibot ansibot added community_review and removed WIP labels Nov 29, 2018

zikalino added some commits Nov 29, 2018

@zikalino zikalino closed this Nov 29, 2018

@zikalino zikalino reopened this Nov 29, 2018

@nitzmahone

A few minor things that could use clarification or updates, but otherwise LGTM

- List of Cosmos DB capabilities for the account
type: list
suboptions:
name:

This comment has been minimized.

@nitzmahone

nitzmahone Dec 5, 2018

Member

Since the current underlying API only treats these as a list of strings, any reason not to flatten it and make it a simple list with choices?

(total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists."
type: int
database_account_offer_type:
description:

This comment has been minimized.

@nitzmahone

nitzmahone Dec 5, 2018

Member

should probably have choices specified if possible

description:
- "Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list
of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces."
is_virtual_network_filter_enabled:

This comment has been minimized.

@nitzmahone

nitzmahone Dec 5, 2018

Member

type: bool?

type: list
suboptions:
id:
description:

This comment has been minimized.

@nitzmahone

nitzmahone Dec 5, 2018

Member

I'm loathe to add another layer of depth to this, but should we consider having this follow the same patterns the other modules are now with taking either a flat ID or a name + optional RG name?

/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{
subnetName}."
enable_multiple_write_locations:
description:

This comment has been minimized.

@nitzmahone

nitzmahone Dec 5, 2018

Member

type: bool?

that:
- output.changed
# currently disabled as there's a bug in SDK / Service

This comment has been minimized.

@nitzmahone

nitzmahone Dec 5, 2018

Member

Does this mean that state: absent is not idempotent, or is there a race condition or something specific to the test?

@ansibot ansibot added the stale_ci label Dec 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment