mirror of
https://github.com/ansible/tower-cli.git
synced 2026-02-06 00:48:50 +01:00
Added dependencies and related to POSSIBLE_TYPES They are needed for the import functionality i before e except after c Fixed typo in receive Added receive option Changed classname from Destroyer to Cleaner Added empty command Added required=False to scm-type field. This field is not required by the API to create a project Removed items from export if managed_by_tower = True Added credential_type to dependencies for a credential This allows resoluation of a credential_type when importing a credential Added send command Missing __init__.py file Added type parameter to cleaner Send and Receive now can do json or yaml Removed possible types, adding its items into resource objects Changed how assets are specified for export Added exception if nothing was passed in to process Added all option to cleaner method Fixed issue where properties added in the source were not caught as needed to be updated Added send/recieve/empty docs Updated help text for empty Move removeEncryptedValues to common Added deepclone of asset when determining if asset needs update This fixed an issue when removing items in the asset that were later referenced Fixed some issues when importing credentials Added workflow nodes import/export Initial commit of inventory groups/hosts/sources and fix for vault_creds in job_template Updated API to strip off /api/vX if passed in as url This allows you send URLs retreived from the API back into TowerCLI Caught additional exception If already parsed Java is passed in you could get a TypeError exception which was not caught. Added notification types Added workflow name to error message when extracting nodes When this condition occurs the message is displayed but in a receive no details are present as to what workflow had the error Added all_pages when requesting workflow_nodes Allowed for multiple tokens to be saved in ~/.tower_cli_token.json Added debug log if asset does not have POST options Removed unused import and debug message If an object does not have POST options, just return Changed how errors are logged Added project updates if asset was created or updated Removed local_path from SCM based projects Changed removal of encrypted values from asset to exported_asset Added workflow inventory and credential resolution Added inventory group import/export Added additional credential types for export/import Added options for passwords for new items Variablized workdlow node types Fixed workflow comparison Spell checking All post PR fixes for send/receive Modified print statements for python3 Wrapped TowerCLI class in try This should give us a better error when performing exports Don't get source project if its None Fixed user passwords Moved projects before inventory An inventory with a source from a project requires projects to be created first Added inventory source_script resolution Another change for comparing workflow nodes Revert "Merge remote-tracking branch 'upstream/master'" This reverts commit d8b0d2dbff2713a86aee4c7ca901d789b6e1d470, reversing changes made to 87ea5d2c6118f797dd908404974e790df8e4059a. Fixed unintended injection of documentation Added todo Removed comments for pull request Removed commants on dropping format Fixed bad merge Updated for flake8 Added all_pages to lists Better handeling of extra_vars Multiple changes Made empty take params like receive Output of send and empty are now ansible-ish Changed function name to python standards Extracted 'work' into method for calling programatically Fixed missing : Fixed newline at end of file causing flake8 failure removed closing #'s Changed from passing on TypeError to continuing if not a string Added min_value and max_value to list of known types Changed from .prefix to .get_prefix() Moved out touchup_extra_vars so that it applies to all asset_types Fixed issue where tox was sending back a json_token of 'invalid' causing issues with the dict Added missing POST endpoint Use six for string compare
32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
# Copyright 2015, Ansible, Inc.
|
|
# Luke Sneeringer <lsneeringer@ansible.com>
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
from tower_cli import models
|
|
from tower_cli.cli import types
|
|
|
|
|
|
class Resource(models.Resource):
|
|
"""A resource for teams."""
|
|
cli_help = 'Manage teams within Ansible Tower.'
|
|
endpoint = '/teams/'
|
|
identity = ('organization', 'name')
|
|
dependencies = ['organization']
|
|
|
|
name = models.Field(unique=True)
|
|
organization = models.Field(type=types.Related('organization'))
|
|
description = models.Field(required=False, display=False)
|
|
|
|
users = models.ManyToManyField('user', method_name='')
|