Skip to content

Commit

Permalink
Remove redundant get_obj method (ansible#26324)
Browse files Browse the repository at this point in the history
vmware_guest_facts has redundant get_obj method, this can
be removed safetly.

Signed-off-by: Abhijeet Kasurde <[email protected]>
  • Loading branch information
Akasurde authored and jctanner committed Jul 14, 2017
1 parent c10a59b commit a1977d9
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions lib/ansible/modules/cloud/vmware/vmware_guest_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,27 +145,6 @@ def gather_facts(self, vm):
return gather_vm_facts(self.content, vm)


def get_obj(content, vimtype, name):
"""
Return an object by name, if name is None the
first found object is returned
"""
obj = None
container = content.viewManager.CreateContainerView(
content.rootFolder, vimtype, True)
for c in container.view:
if name:
if c.name == name:
obj = c
break
else:
obj = c
break

container.Destroy()
return obj


def main():
module = AnsibleModule(
argument_spec=dict(
Expand Down

0 comments on commit a1977d9

Please sign in to comment.