Skip to content
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

fix spelling mistakes in several modules #36296

Merged
merged 2 commits into from
Mar 12, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def core(module):
if cert['name'] == name:
module.fail_json(msg="Certificate name %s already exists" % name)

# Certificate does not exists, let us create it
# Certificate does not exist, let us create it
cert_data = dict(name=name,
private_key=module.params['private_key'],
leaf_certificate=module.params['leaf_certificate'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
name: production
state: present

- name: tag a resource; creating the tag if it does not exists
- name: tag a resource; creating the tag if it does not exist
digital_ocean_tag:
name: "{{ item }}"
resource_id: "73333005"
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gc_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def handle_delete(module, gs, bucket, obj):
if key_check(module, gs, bucket, obj):
module.exit_json(msg="Object has been deleted.", changed=delete_key(module, gs, bucket, obj))
else:
module.exit_json(msg="Object does not exists.", changed=False)
module.exit_json(msg="Object does not exist.", changed=False)
else:
module.exit_json(msg="Bucket does not exist.", changed=False)
else:
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def _attached_sds_service(self, dc_name):
# Get data center object of the storage domain:
dcs_service = self._connection.system_service().data_centers_service()

# Search the data_center name, if it does not exists, try to search by guid.
# Search the data_center name, if it does not exist, try to search by guid.
dc = search_by_name(dcs_service, dc_name)
if dc is None:
dc = get_entity(dcs_service.service(dc_name))
Expand Down
6 changes: 3 additions & 3 deletions lib/ansible/modules/cloud/vmware/vmware_guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ def sanitize_network_params(self):
" a VLAN name under VM network list.")

if 'name' in network and find_obj(self.content, [vim.Network], network['name']) is None:
self.module.fail_json(msg="Network '%(name)s' does not exists" % network)
self.module.fail_json(msg="Network '%(name)s' does not exist." % network)
Copy link
Contributor

@mkrizek mkrizek Feb 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The integration tests need to be changed as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you tell me where to find these?
Searching for "does not exists" didn't give any results.
However I found more spelling mistakes that I can fix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- "\"Network 'Non existent VM' does not exists\" in non_existent_network.msg"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkrizek , done.

elif 'vlan' in network:
dvps = self.cache.get_all_objs(self.content, [vim.dvs.DistributedVirtualPortgroup])
for dvp in dvps:
Expand Down Expand Up @@ -1176,7 +1176,7 @@ def customize_vm(self, vm_obj):
ident.guiRunOnce.commandList = self.params['customization']['runonce']

else:
# FIXME: We have no clue whether this non-Windows OS is actually Linux, hence it might fail !
# FIXME: We have no clue whether this non-Windows OS is actually Linux, hence it might fail!

# For Linux guest OS, use LinuxPrep
# https://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.vm.customization.LinuxPrep.html
Expand All @@ -1195,7 +1195,7 @@ def customize_vm(self, vm_obj):
self.customspec.identity = ident

def get_vm_scsi_controller(self, vm_obj):
# If vm_obj doesn't exists no SCSI controller to find
# If vm_obj doesn't exist there is no SCSI controller to find
if vm_obj is None:
return None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def state_remove_role(self):
failIfUsed=self.force)
except vim.fault.NotFound as e:
self.module.fail_json(msg="Failed to remove a role %s as the user specified role name "
"does not exists." % self.role_name,
"does not exist." % self.role_name,
details=e.msg)
except vim.fault.RemoveFailed as e:
msg = "Failed to remove a role %s as the user specified role name." % self.role_name
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/vmware/vmware_vm_vm_drs_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def normalize_rule_spec(rule_obj=None):
# Create
def create(self):
"""
Function to create a DRS rule if rule does not exists
Function to create a DRS rule if rule does not exist
"""
rule_obj = self.get_rule_key_by_name(rule_name=self.rule_name)
if rule_obj is not None:
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
ipa_user: admin
ipa_pass: topsecret

- name: Ensure sudo command group does not exists
- name: Ensure sudo command group does not exist
ipa_sudocmdgroup:
name: group01
state: absent
Expand Down
6 changes: 3 additions & 3 deletions lib/ansible/modules/monitoring/grafana_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ def grafana_delete_dashboard(module, data):
else:
raise GrafanaAPIException('Unable to update the dashboard %s : %s' % (data['slug'], info))
else:
# dashboard does not exists : do nothing
result = {'msg': "Dashboard %s does not exists" % data['slug'],
# dashboard does not exist, do nothing
result = {'msg': "Dashboard %s does not exist." % data['slug'],
'changed': False,
'slug': data['slug']}

Expand Down Expand Up @@ -274,7 +274,7 @@ def grafana_export_dashboard(module, data):
'slug': data['slug'],
'changed': True}
else:
result = {'msg': "Dashboard %s does not exists" % data['slug'],
result = {'msg': "Dashboard %s does not exist." % data['slug'],
'slug': data['slug'],
'changed': False}

Expand Down
4 changes: 2 additions & 2 deletions lib/ansible/modules/monitoring/grafana_datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,8 @@ def grafana_delete_datasource(module, data):
else:
raise GrafanaAPIException('Unable to update the datasource id %s : %s' % (ds['id'], info))
else:
# datasource does not exists : do nothing
result = {'msg': "Datasource %s does not exists" % data['name'],
# datasource does not exist, do nothing
result = {'msg': "Datasource %s does not exist." % data['name'],
'changed': False,
'id': 0,
'name': data['name']}
Expand Down
8 changes: 4 additions & 4 deletions lib/ansible/modules/network/cloudengine/ce_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,15 +809,15 @@ def work(self):
# delete interface
self.delete_interface(self.interface)
else:
# interface does not exists
# interface does not exist
self.module.fail_json(
msg='Error: interface does not exists.')
msg='Error: interface does not exist.')

else: # default
if not self.intf_info:
# error, interface does not exists
# error, interface does not exist
self.module.fail_json(
msg='Error: interface does not exists.')
msg='Error: interface does not exist.')
else:
self.default_interface(self.interface)

Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/network/cloudengine/ce_mtu.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def check_params(self):
# get interface info
self.intf_info = self.get_interface_dict(self.interface)
if not self.intf_info:
self.module.fail_json(msg='Error: interface does not exists.')
self.module.fail_json(msg='Error: interface does not exist.')

# check interface
if self.mtu and self.intf_info['isL2SwitchPort'] == 'true':
Expand Down
4 changes: 2 additions & 2 deletions lib/ansible/modules/network/cloudengine/ce_switchport.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ def check_params(self):
# get interface info
self.intf_info = self.get_interface_dict(self.interface)
if not self.intf_info:
self.module.fail_json(msg='Error: Interface does not exists.')
self.module.fail_json(msg='Error: Interface does not exist.')

if not self.is_l2switchport():
self.module.fail_json(
Expand Down Expand Up @@ -764,7 +764,7 @@ def work(self):

self.check_params()
if not self.intf_info:
self.module.fail_json(msg='Error: interface does not exists.')
self.module.fail_json(msg='Error: interface does not exist.')

self.get_existing()
self.get_proposed()
Expand Down
4 changes: 2 additions & 2 deletions lib/ansible/modules/source_control/gitlab_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
module: gitlab_group
short_description: Creates/updates/deletes Gitlab Groups
description:
- When the group does not exists in Gitlab, it will be created.
- When the group does not exist in Gitlab, it will be created.
- When the group does exists and state=absent, the group will be deleted.
version_added: "2.1"
author: "Werner Dijkerman (@dj-wasabi)"
Expand Down Expand Up @@ -209,7 +209,7 @@ def main():
module.exit_json(changed=True, result="Successfully deleted group %s" % group_name)
else:
if state == "absent":
module.exit_json(changed=False, result="Group deleted or does not exists")
module.exit_json(changed=False, result="Group deleted or does not exist")
else:
if group_exists:
module.exit_json(changed=False)
Expand Down
4 changes: 2 additions & 2 deletions lib/ansible/modules/source_control/gitlab_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
module: gitlab_project
short_description: Creates/updates/deletes Gitlab Projects
description:
- When the project does not exists in Gitlab, it will be created.
- When the project does not exist in Gitlab, it will be created.
- When the project does exists and state=absent, the project will be deleted.
- When changes are made to the project, the project will be updated.
version_added: "2.1"
Expand Down Expand Up @@ -392,7 +392,7 @@ def main():
module.exit_json(changed=True, result="Successfully deleted project %s" % project_name)
else:
if state == "absent":
module.exit_json(changed=False, result="Project deleted or does not exists")
module.exit_json(changed=False, result="Project deleted or does not exist")
else:
if project.createOrUpdateProject(project_exists, group_name, import_url, arguments):
module.exit_json(changed=True, result="Successfully created or updated the project %s" % project_name)
Expand Down
4 changes: 2 additions & 2 deletions lib/ansible/modules/source_control/gitlab_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
module: gitlab_user
short_description: Creates/updates/deletes Gitlab Users
description:
- When the user does not exists in Gitlab, it will be created.
- When the user does not exist in Gitlab, it will be created.
- When the user does exists and state=absent, the user will be deleted.
- When changes are made to user, the user will be updated.
version_added: "2.1"
Expand Down Expand Up @@ -352,7 +352,7 @@ def main():

# Check if user exists, if not exists and state = absent, we exit nicely.
if not user.existsUser(user_username) and state == "absent":
module.exit_json(changed=False, result="User already deleted or does not exists")
module.exit_json(changed=False, result="User already deleted or does not exist")
else:
# User exists,
if state == "absent":
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/system/osx_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def read(self):
# First try to find out the type
rc, out, err = self.module.run_command(self._base_command() + ["read-type", self.domain, self.key])

# If RC is 1, the key does not exists
# If RC is 1, the key does not exist
if rc == 1:
return None

Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/web_infrastructure/ejabberd_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
EXAMPLES = '''
# Example playbook entries using the ejabberd_user module to manage users state.

- name: create a user if it does not exists
- name: create a user if it does not exist
ejabberd_user:
username: test
host: server
Expand Down
2 changes: 1 addition & 1 deletion test/integration/targets/ecs_ecr/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
- result is not changed


- name: When in check mode, and deleting a policy that does not exists
- name: When in check mode, and deleting a policy that does not exist
ecs_ecr:
region: '{{ ec2_region }}'
name: '{{ ecr_name }}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
assert:
that:
- "not non_existent_network.changed"
- "\"Network 'Non existent VM' does not exists\" in non_existent_network.msg"
- "\"Network 'Non existent VM' does not exist\" in non_existent_network.msg"

- name: create new VMs with network and with only IP
vmware_guest:
Expand Down
2 changes: 1 addition & 1 deletion test/integration/targets/win_dsc/tasks/destructive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
name: xWebAdministration
state: present

- name: ensure IIS website does not exists
- name: ensure IIS website does not exist
win_iis_website:
name: Ansible DSC Test
state: absent
Expand Down