Commit Graph

48 Commits

Author SHA1 Message Date
softwarefactory-project-zuul[bot]
8be46e43b4 Merge pull request #4600 from ryanpetrello/cli-json-inputs
cli: improve parsing of JSON inputs

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2019-08-27 20:33:51 +00:00
Ryan Petrello
f22adca6f7 improve parsing of JSON inputs
see: https://github.com/ansible/awx/issues/4573
see: https://github.com/ansible/awx/issues/2371
2019-08-27 12:47:27 -04:00
Jim Ladd
7bf250ecfa show default messages in options 2019-08-24 20:37:59 -07:00
Ryan Petrello
6da445f7c0 remove /api/v1 and deprecated credential fields 2019-06-06 12:23:00 -04:00
Ryan Petrello
13c05c68fc fix a few additional py3 issues
related: https://github.com/ansible/awx/issues/3329
2019-02-27 16:56:36 -05:00
Ryan Petrello
2927803a82 fix overindent lint failures 2019-01-30 12:12:39 -05:00
Ryan Petrello
f223df303f convert py2 -> py3 2019-01-15 14:09:01 -05:00
AlanCoding
72ce7b194f allow UI to filter by type again 2018-10-24 13:35:04 -04:00
AlanCoding
b97626bf37 show filterable: False if not filterable 2018-07-03 15:21:10 -04:00
Jake McDermott
0682d19d5e show filterable:true for filterable fields 2018-05-03 17:37:19 -04:00
AlanCoding
86579775b2 field OPTIONS tip for filterability 2018-03-29 10:55:43 -04:00
Ryan Petrello
7472026cca remove the new_in_<version> in API doc gen
see: https://github.com/ansible/awx/issues/73
2018-02-08 16:21:22 -05:00
Chris Meyers
a08a158672 remove azure 2017-09-18 10:35:32 -04:00
Matthew Jones
c7a85d9738 Mass rename from ansible_(awx|tower) -> (awx|tower) 2017-07-26 13:33:26 -04:00
AlanCoding
dfa892aae1 provide id field in attaching sublists 2017-07-21 13:50:27 -04:00
Chris Meyers
c11b870084 remove job_type scan from options
* Need to keep the scan job in job_type for migrations so just remove it
from the constructed OPTIONS
2017-07-21 10:45:17 -04:00
Ryan Petrello
b98d384671 filter CredentialType OPTIONS *and* help text for kind requirements
see: #7115
see: #6959
2017-07-18 17:51:07 -04:00
Ryan Petrello
09055f9c2f fix a few issues in credential type kind validation
- fix a typo from `network` to `net`
- properly update OPTIONS for CredentialTypes to reflect allowed `kind`
  values for POST/PUT/

see: #6959
2017-07-11 09:43:55 -04:00
Ryan Petrello
39525316ac prefix all /api/v1/ view descriptions with a deprecation message
additionally, fix a bug in /api/v1/credentials/ view descriptions that
causes v2 fields to display (see: #6116)
2017-06-21 16:27:07 -04:00
Aaron Tan
cfb633e8a6 Dependency Updates
* Dynamic Inventory Source
Template against ansible 2.3 dynamic inventory sources.
The major change is removal of `rax.py`. Most upstream scripts except
`foreman.py` has quite trivial coding style changes, or minor functional
extensions  that does not affect Tower inventory update runs.
`foreman.py`, on the other hand, went through quite a major refactoring,
but functionalities stay the same.

Major python dependency updates include apache-libcloud (1.3.0 -->
2.0.0), boto (2.45.0 --> 2.46.1) and shade (1.19.0 --> 1.20.0). Minor
python dependency updates include indirect updates via `pip-compile`,
which are determined by base dependencies.

Some minor `task.py` extensions:
 - `.ini` file for ec2 has one more field `stack_filter=False`, which
   reveals changes in `ec2.py`.
 - `.ini` file for cloudforms will catch these four options from
   `source_vars_dict` of inventory update: `'version', 'purge_actions',
   'clean_group_keys', 'nest_tags'`. These four options have always been
   available in `cloudforms.py` but `cloudforms.ini.example` has not
   mentioned them until the latest version. For consistency with upstream
   docs, we should make these fields available for tower user to customize.
 - YAML file of openstack will catch ansible options `use_hostnames`,
   `expand_hostvars` and `fail_on_errors` from `source_vars_dict` of
   inventory update as a response to issue #6075.

* Remove Rackspace support
Supports of Rackspace as both a dynamic inventory source and a cloud
credential are fully removed. Data migrations have been added to support
arbitrary credential types feature and delete rackspace inventory
sources.

Note also requirement `jsonschema` has been moved from
`requirements.txt` to `requirements.in` as a primary dependency to
reflect it's usage in `/main/fields.py`.

Connected issue: #6080.

* `pexpect` major update
`pexpect` stands at the very core of our task system and underwent a
major update from 3.1 to 4.2.1. Although verified during devel, please
still be mindful of any suspicious issues on celery side even after this
PR gets merged.

* Miscellaneous
 - requests now explicitly declared in `requirements.in` at version 2.11.1
   in response to upstream issue
 - celery: 3.1.17 -> 3.1.25
 - django-extensions: 1.7.4 -> 1.7.8
 - django-polymorphic: 0.7.2 -> 1.2
 - django-split-settings: 0.2.2 -> 0.2.5
 - django-taggit: 0.21.3 -> 0.22.1
 - irc: 15.0.4 -> 15.1.1
 - pygerduty: 0.35.1 -> 0.35.2
 - pyOpenSSL: 16.2.0 -> 17.0.0
 - python-saml: 2.2.0 -> 2.2.1
 - redbaron: 0.6.2 -> 0.6.3
 - slackclient: 1.0.2 -> 1.0.5
 - tacacs_plus: 0.1 -> 0.2
 - xmltodict: 0.10.2 -> 0.11.0
 - pip: 8.1.2 -> 9.0.1
 - setuptools: 23.0.0 -> 35.0.2
 - (requirements_ansible.in only)kombu: 3.0.35 -> 3.0.37
2017-05-08 12:03:02 -04:00
Ryan Petrello
7e64a6fd60 add "added_in_api_version" metadata to OPTIONS requests 2017-04-21 15:42:27 -04:00
Matthew Jones
1fefa4cfdd Merge branch 'stable' into devel
* stable: (275 commits)
  Install correct rpm-sign package in RPM builder
  Updating changelog for 3.1 release
  Switch job_type to check from sync when detecting delete_on_update
  use Unicode apostrophes - not single quotes - for French i18n strings
  pin appdirs==1.4.2
  only cancel deps if we can cancel the inv update
  fixing module_name check and adding support for the debug module
  cancel jobs dependent on inv update
  update tests
  CSS tweaks to workflow results panels
  like inventory updates, check if project update deps already processed
  Revert "Merge pull request #5553 from chrismeyersfsu/fix-waiting_blocked"
  Add awx/ui/client/languages to .gitignore
  Delete awx/ui/client/languages/*.json
  refactor based on review
  Add missing permission check.
  Make current_groups a set to easily avoid duplicates, update asgi-amqp requirement
  avoid duplicated related search fields
  Fix workflow audit items
  fixing module name, json blob, and stdout-for-yum-module on host event
  ...
2017-02-28 11:37:05 -05:00
Aaron Tan
7415880f20 Merge pull request #5515 from jangsutsr/3254_update_host_detail_put_option
Update host detail put option rework
2017-02-24 16:58:09 -05:00
Ryan Petrello
5dfdef6e6b retain the default interstitial value for TOWER_URL_BASE
to support #5470, check for the presence of this special interstitial
value and replace it with the request hostname for settings OPTIONS
requests
2017-02-23 16:38:16 -05:00
jangsutsr
5af389949e update ACTIONS field of metadata. 2017-02-22 15:45:43 -05:00
Ryan Petrello
94ad12ab0d set the default in OPTIONS for TOWER_URL_BASE to the request hostname
see: #5470
2017-02-22 11:16:08 -05:00
Matthew Jones
986ef9e2eb Merge branch 'release_3.1.0' into devel
* release_3.1.0: (186 commits)
  check related credential for inventory source
  Fixed org jt's smart status
  Show the data that would have been a problem sending payload
  Implement optional message persistence on callback events
  changing the related tab on an edit of an organization to be for users, instead of users & teams
  fixing cancel function for workflow results
  Handle deleting root node while adding a child to that root node
  Skip sending task to process cache changes when migrating to database settings.
  only loop over project OPTIONS response if the response is valid
  Added the ability to pass in a maximum number of pages shown to pagination directive.  This is useful for narrow lists particularly in modals.
  fix a CTinT bug in static config parsing
  Recursively fetch workflow nodes when there is more than 1 page of nodes
  enforce a sane default OPT_NETWORK_TIMEOUT for LDAP connections
  Labels expects the iterator to be `template` not `job_template`
  Disable workflow editor save when currently adding a node
  Fixed up organizations/job templates list
  surface dry_run option for system jobs through the API
  fix bugs with system auditors and orphan JTs
  incorporating organization into the custom inv script option selection for a group
  catch and log LDAP auth plugin misconfigurations
  ...
2017-02-08 14:01:39 -05:00
Ryan Petrello
8615c1e999 add the max_page_size value to the OPTIONS response for list views
see: #4356
2017-02-06 15:18:42 -05:00
Ryan Petrello
afc0f16e58 add a field to OPTIONS that tells if the setting came from a .py file
additionally, update help_text with a helpful message about this

See: #4876
2017-02-02 12:47:53 -05:00
Matthew Jones
829552f81a Merge branch 'release_3.1.0' into devel
* release_3.1.0: (633 commits)
  query for failed projects to include canceled
  Style Audit of Host Event Modal
  Remove npm hacks in RPM builder
  Update po files
  Update pot files
  Make sure to delete any nodes that need to be deleted before attempting to associate
  super-user requests to HostDetail go through rbac
  Launch job with prompts fixes
  add notifications to cleanup_jobs
  allow can_add to be called for permission info
  Elaborate on system job default
  i accidentally removed the "-1" from this check, adding it back in
  remove job_event text filters, tweaked RBAC see issue 4958 for the RBAC details
  fixing jshint
  Adding tags was creating this nested array structure which was causing buggy behavior.  This should fix that.
  bump vmware inventory script
  Fix up some unit tests
  moving appendToBottom function elsewhere
  rearranging logic to match integrity of existing logic
  Fixed location of sub-category dropdowns
  ...
2017-01-27 20:52:59 -05:00
AlanCoding
2146777cc6 reorder terms to avoid pulling full UJT list 2017-01-12 17:32:13 -05:00
Chris Church
ea10ff8b93 Initial pass at related search fields. 2016-12-13 21:44:09 -05:00
Matthew Jones
703f4925cb Bumping versions to 3.2.0 2016-12-04 21:21:22 -05:00
Aaron Tan
9e4655419e Fix flake8 E302 errors. 2016-11-15 20:59:39 -05:00
sundeep-co-in
78a8ce9479 django i18n 2016-10-18 18:10:39 +05:30
Chris Church
6ebe45b1bd Configure Tower in Tower:
* Add separate Django app for configuration: awx.conf.
* Migrate from existing main.TowerSettings model to conf.Setting.
* Add settings wrapper to allow get/set/del via django.conf.settings.
* Update existing references to tower_settings to use django.conf.settings.
* Add a settings registry to allow for each Django app to register configurable settings.
* Support setting validation and conversion using Django REST Framework fields.
* Add /api/v1/settings/ to display a list of setting categories.
* Add /api/v1/settings/<slug>/ to display all settings in a category as a single object.
* Allow PUT/PATCH to update setting singleton, DELETE to reset to defaults.
* Add "all" category to display all settings across categories.
* Add "changed" category to display only settings configured in the database.
* Support per-user settings via "user" category (/api/v1/settings/user/).
* Support defaults for user settings via "user-defaults" category (/api/v1/settings/user-defaults/).
* Update serializer metadata to support category, category_slug and placeholder on OPTIONS responses.
* Update serializer metadata to handle child fields of a list/dict.
* Hide raw data form in browsable API for OPTIONS and DELETE.
* Combine existing licensing code into single "TaskEnhancer" class.
* Move license helper functions from awx.api.license into awx.conf.license.
* Update /api/v1/config/ to read/verify/update license using TaskEnhancer and settings wrapper.
* Add support for caching settings accessed via settings wrapper.
* Invalidate cached settings when Setting model changes or is deleted.
* Preload all database settings into cache on first access via settings wrapper.
* Add support for read-only settings than can update their value depending on other settings.
* Use setting_changed signal whenever a setting changes.
* Register configurable authentication, jobs, system and ui settings.
* Register configurable LDAP, RADIUS and social auth settings.
* Add custom fields and validators for URL, LDAP, RADIUS and social auth settings.
* Rewrite existing validator for Credential ssh_private_key to support validating private keys, certs or combinations of both.
* Get all unit/functional tests working with above changes.
* Add "migrate_to_database_settings" command to determine settings to be migrated into the database and comment them out when set in Python settings files.
* Add support for migrating license key from file to database.
* Remove database-configuable settings from local_settings.py example files.
* Update setup role to no longer install files for database-configurable settings.

f 94ff6ee More settings work.
f af4c4e0 Even more db settings stuff.
f 96ea9c0 More settings, attempt at singleton serializer for settings.
f 937c760 More work on singleton/category views in API, add code to comment out settings in Python files, work on command to migrate settings to database.
f 425b0d3 Minor fixes for sprint demo.
f ea402a4 Add support for read-only settings, cleanup license engine, get license support working with DB settings.
f ec289e4 Rename migration, minor fixmes, update setup role.
f 603640b Rewrite key/cert validator, finish adding social auth fields, hook up signals for setting_changed, use None to imply a setting is not set.
f 67d1b5a Get functional/unit tests passing.
f 2919b62 Flake8 fixes.
f e62f421 Add redbaron to requirements, get file to database migration working (except for license).
f c564508 Add support for migrating license file.
f 982f767 Add support for regex in social map fields.
2016-09-26 22:14:47 -04:00
Matthew Jones
5895b3a343 Refactor Notification's naming
Notifier -> NotificationTemplate
notifier -> notification_template
2016-05-05 13:53:46 -04:00
Wayne Witzel III
39f05e2f11 Update user roles list API documentation 2016-04-07 10:36:12 -04:00
Wayne Witzel III
554d8ed8a6 add customer API doc fixes:#1390 2016-04-04 12:06:13 -04:00
Chris Church
aedf1d87ab Fix help text in OPTIONS for common, read-only fields. Also fix display of None for foreign key fields in browsable API help. 2016-03-29 11:03:16 -04:00
Matthew Jones
526a6ec7dd Remove unneeded fetch for r/o fields 2016-03-16 13:12:13 -04:00
Matthew Jones
45f95bf2b2 Disallow related elements to be treated as choices
DRF will try to resolve potential candidates into the OPTIONS endpoint.
This is mainly to support their POST field in the browseable API.   We
don't need this and it can yield some expensive queries so we bypass
generating choices for any RelatedField fields
2016-03-16 13:11:05 -04:00
Matthew Jones
99ec07b8a5 Merge branch 'notifications_work' into devel
* notifications_work: (23 commits)
  Updates to notification unit tests after @wwitzel3's feedback
  Fix some notifications issues and write some tests
  Add notification system documentation
  Clean up flake8 related issues
  Fixing up some unicode issues
  Implement tower ui view url on models
  Sanity check and force proper types in admin check
  Proper type for in check
  Adding migration and base notification type
  Add a periodic administrative notification
  Refactor message generator
  Support notification password field encryption
  Notification configuration type checking
  Refactor NotificationTemplate to Notifier
  Implement irc notification backend
  Add webhook notification backend
  Pagerduty and Hipchat backends plus some cleanup
  Notification serializers, views, and tasks
  Implement notification serializer and validations
  Notification endpoints and url expositions
  ...
2016-02-29 16:50:33 -05:00
Chris Meyers
d70615efbd bring back meta choice options lost in upgrade
* status and launch_type OPTIONS choices were lost in the django + drf
upgrade. This brings them back.
2016-02-22 12:58:35 -05:00
Matthew Jones
dde70dafec Refactor NotificationTemplate to Notifier 2016-02-17 15:18:18 +00:00
Chris Church
23feccdbf3 Check if view has a get_serializer method before trying to call it. Fixes OPTIONS issue in #788. 2016-02-05 04:45:14 -05:00
Matthew Jones
319deffc18 Implement notification serializer and validations 2016-02-04 15:52:23 -05:00
Chris Church
60224cdbe4 Update Django to 1.8 and DRF to 3.3, add new Django migrations, update serializers/pagination/metadata, update browsable API styling. 2016-02-02 17:48:04 -05:00