Skip to content

Commit

Permalink
Add log_mode and log_path to azure.py (#540)
Browse files Browse the repository at this point in the history
* add log_mode and log_path to azure.py

* add to arg spec

* fix sanity fail

* unset pylint version

* fix sanity fail on python2.7

* remove python -v

* revert ado.sh
  • Loading branch information
Fred-sun authored May 17, 2021
1 parent 53b7da5 commit 619c46c
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 1,321 deletions.
8 changes: 8 additions & 0 deletions plugins/doc_fragments/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ class ModuleDocFragment(object):
type: str
default: latest
version_added: '0.0.1'
log_path:
description:
- Parent argument.
type: str
log_mode:
description:
- Parent argument.
type: str
requirements:
- python >= 2.7
- The host that executes this module must have the azure.azcollection collection installed via galaxy
Expand Down
4 changes: 3 additions & 1 deletion plugins/module_utils/azure_rm_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@
cloud_environment=dict(type='str', default='AzureCloud'),
cert_validation_mode=dict(type='str', choices=['validate', 'ignore']),
api_profile=dict(type='str', default='latest'),
adfs_authority_url=dict(type='str', default=None)
adfs_authority_url=dict(type='str', default=None),
log_mode=dict(type='str', no_log=True),
log_path=dict(type='str', no_log=True),
)

AZURE_CREDENTIAL_ENV_MAPPING = dict(
Expand Down
10 changes: 0 additions & 10 deletions plugins/modules/azure_rm_aduser.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,6 @@
- Filter that can be used to specify a user to update or delete.
- Mutually exclusive with I(object_id), I(attribute_name), and I(user_principal_name).
type: str
log_path:
description:
- parent argument.
type: str
log_mode:
description:
- parent argument.
type: str
extends_documentation_fragment:
- azure.azcollection.azure
Expand Down Expand Up @@ -241,8 +233,6 @@ def __init__(self):
user_type=dict(type='str'),
mail=dict(type='str'),
tenant=dict(type='str', required=True),
log_path=dict(type='str'),
log_mode=dict(type='str'),
)

self.tenant = None
Expand Down
10 changes: 0 additions & 10 deletions plugins/modules/azure_rm_aduser_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@
- It is recommended that you instead identify a subset of users and use filter.
- Mutually exclusive with I(object_id), I(attribute_name), I(odata_filter) and I(user_principal_name).
type: bool
log_path:
description:
- parent argument.
type: str
log_mode:
description:
- parent argument.
type: str
extends_documentation_fragment:
- azure.azcollection.azure
Expand Down Expand Up @@ -178,8 +170,6 @@ def __init__(self):
odata_filter=dict(type='str'),
all=dict(type='bool'),
tenant=dict(type='str', required=True),
log_path=dict(type='str'),
log_mode=dict(type='str'),
)

self.tenant = None
Expand Down
10 changes: 0 additions & 10 deletions plugins/modules/azure_rm_backuppolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,6 @@
- Timezone to apply schedule_run_time.
default: UTC
type: str
log_path:
description:
- parent argument.
type: str
log_mode:
description:
- parent argument.
type: str
extends_documentation_fragment:
- azure.azcollection.azure
Expand Down Expand Up @@ -209,8 +201,6 @@ def __init__(self):
daily_retention_count=dict(type='int'),
schedule_weekly_frequency=dict(type='int'),
time_zone=dict(type='str', default='UTC'),
log_path=dict(type='str'),
log_mode=dict(type='str')
)

self.vault_name = None
Expand Down
10 changes: 0 additions & 10 deletions plugins/modules/azure_rm_backuppolicy_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@
- The name of the resource group the vault is in.
required: true
type: str
log_path:
description:
- parent argument.
type: str
log_mode:
description:
- parent argument.
type: str
extends_documentation_fragment:
- azure.azcollection.azure
Expand Down Expand Up @@ -108,8 +100,6 @@ def __init__(self):
vault_name=dict(type='str', required=True),
name=dict(type='str', required=True),
resource_group=dict(type='str', required=True),
log_path=dict(type='str'),
log_mode=dict(type='str')
)

self.vault_name = None
Expand Down
6 changes: 1 addition & 5 deletions plugins/modules/azure_rm_iotdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,6 @@ def __init__(self):
self.primary_key = None
self.secondary_key = None

required_if = [
['auth_method', 'self_signed', ['certificate_authority']]
]

self._base_url = None
self._mgmt_client = None
self.query_parameters = {
Expand All @@ -284,7 +280,7 @@ def __init__(self):
'Content-Type': 'application/json; charset=utf-8',
'accept-language': 'en-US'
}
super(AzureRMIoTDevice, self).__init__(self.module_arg_spec, supports_check_mode=True, required_if=required_if)
super(AzureRMIoTDevice, self).__init__(self.module_arg_spec, supports_check_mode=True)

def exec_module(self, **kwargs):

Expand Down
6 changes: 1 addition & 5 deletions plugins/modules/azure_rm_iotdevicemodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,6 @@ def __init__(self):
self.primary_key = None
self.secondary_key = None

required_if = [
['auth_method', 'self_signed', ['certificate_authority']]
]

self._base_url = None
self._mgmt_client = None
self.query_parameters = {
Expand All @@ -222,7 +218,7 @@ def __init__(self):
'Content-Type': 'application/json; charset=utf-8',
'accept-language': 'en-US'
}
super(AzureRMIoTDeviceModule, self).__init__(self.module_arg_spec, supports_check_mode=True, required_if=required_if)
super(AzureRMIoTDeviceModule, self).__init__(self.module_arg_spec, supports_check_mode=True)

def exec_module(self, **kwargs):

Expand Down
14 changes: 0 additions & 14 deletions plugins/modules/azure_rm_roledefinition.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@
choices:
- absent
- present
log_path:
description:
- parent argument.
type: str
log_mode:
description:
- parent argument.
type: str
extends_documentation_fragment:
- azure.azcollection.azure
Expand Down Expand Up @@ -200,12 +192,6 @@ def __init__(self):
default='present',
choices=['present', 'absent']
),
log_path=dict(
type='str'
),
log_mode=dict(
type='str'
)
)

self.name = None
Expand Down
14 changes: 0 additions & 14 deletions plugins/modules/azure_rm_roledefinition_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@
choices:
- system
- custom
log_path:
description:
- parent argument.
type: str
log_mode:
description:
- parent argument.
type: str
extends_documentation_fragment:
- azure.azcollection.azure
Expand Down Expand Up @@ -173,12 +165,6 @@ def __init__(self):
type='str',
choices=['custom', 'system']
),
log_path=dict(
type='str'
),
log_mode=dict(
type='str'
)
)

self.role_name = None
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/azure_rm_virtualmachine_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@
description:
- A list of Availability Zones for your VM.
type: list
sample: [1]
power_state:
description:
- Power state of the virtual machine.
Expand Down
Loading

0 comments on commit 619c46c

Please sign in to comment.