Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def teams(self):
"""The teams of the organization.
Returns:
EntityManager: EntityManager of the teams of the organization.
"""
url = '{organization}teams/'.format(organization=self.api_url)
return EntityManager(self._tower,
entity_object='Team',
primary_match_field='name',
url=url)
def object_roles(self):
"""The object roles.
Returns:
ObjectRole: The object roles supported.
"""
if not self._object_roles:
url = self._data.get('related', {}).get('object_roles')
self._object_roles = EntityManager(self._tower,
entity_object='ObjectRole',
primary_match_field='name',
url=url)
return self._object_roles
def projects(self):
"""The projects of the organization.
Returns:
EntityManager: EntityManager of the projects.
"""
url = self._data.get('related', {}).get('projects')
return EntityManager(self._tower,
entity_object='Project',
primary_match_field='name',
url=url)
def inventories(self):
"""The inventories of the organization.
Returns:
EntityManager: EntityManager of the inventories of the organization.
"""
url = '{organization}inventories/'.format(organization=self.api_url)
return EntityManager(self._tower,
entity_object='Inventory',
primary_match_field='name',
url=url)
def object_roles(self):
"""The object roles.
Returns:
EntityManager: EntityManager of the roles supported.
"""
url = self._data.get('related', {}).get('object_roles')
return EntityManager(self._tower,
entity_object='ObjectRole',
primary_match_field='name',
url=url)
def credentials(self):
"""The credentials of the organization.
Returns:
EntityManager: EntityManager of the credentials of the organization.
"""
url = '{organization}credentials/'.format(organization=self.api_url)
return EntityManager(self._tower,
entity_object='Credential',
primary_match_field='name',
url=url)
def owner_teams(self):
"""The owner teams of the credential.
Returns:
EntityManager: EntityManager of the teams that are owners.
"""
url = self._data.get('related', {}).get('owner_teams')
return EntityManager(self._tower,
entity_object='Team',
primary_match_field='name',
url=url)
def credentials(self):
"""The credentials of the team.
Returns:
EntityManager: EntityManager of the credentials.
"""
url = self._data.get('related', {}).get('credentials')
return EntityManager(self._tower,
entity_object='Credential',
primary_match_field='name',
url=url)
def object_roles(self):
"""The object roles.
Returns:
EntityManager: EntityManager of the object roles supported.
"""
if not self._object_roles:
url = self._data.get('related', {}).get('object_roles')
self._object_roles = EntityManager(self._tower,
entity_object='ObjectRole',
primary_match_field='name',
url=url)
return self._object_roles
def object_roles(self):
"""The object roles.
Returns:
EntityManager: EntityManager of the object roles supported.
"""
if not self._object_roles:
url = self._data.get('related', {}).get('object_roles')
self._object_roles = EntityManager(self._tower,
entity_object='ObjectRole',
primary_match_field='name',
url=url)
return self._object_roles