Repository: ansible/tower-cli
Pull request #658 (2019-01-23 13:22:46)

Prepare release 3.3.1


Patch:
diff --git a/docs/source/HISTORY.rst b/docs/source/HISTORY.rst
index 1458e7f..088da38 100644
--- a/docs/source/HISTORY.rst
+++ b/docs/source/HISTORY.rst
@@ -1,11 +1,17 @@
 Release History
 ===============
 
-3.3.1 (TBD)
+3.3.1 (2019-01-23)
 -----------
 
  - Fixed associating labels to workflows
  - Associating labels to job template now takes option as --job-template
+ - Allow adding workflows inside of workflows
+ - Allow exporting schedules of workflows
+ - Send command now uses default terminal background color
+ - Fix some unicode errors in send/receive commands
+ - Hide display of page number for human-formatted single page results
+ - Allow setting the custom virtual environment on projects and organizations
 
 3.3.0 (2018-04-25)
 ------------------
diff --git a/tower_cli/cli/resource.py b/tower_cli/cli/resource.py
index 32df5a0..bc6f9bf 100644
--- a/tower_cli/cli/resource.py
+++ b/tower_cli/cli/resource.py
@@ -263,8 +263,7 @@ class ResSubcommand(click.MultiCommand):
             '\n'.join(data_rows),
             divider_row,
         ))
-        # Don't print page numbers for 1 page results
-        if page and total_pages != 1:
+        if page:
             response += '(Page %d of %d.)' % (page, total_pages)
         if payload.get('changed', False):
             response = 'Resource changed.\n' + response
diff --git a/tower_cli/constants.py b/tower_cli/constants.py
index 5fef5b6..9804b21 100644
--- a/tower_cli/constants.py
+++ b/tower_cli/constants.py
@@ -13,7 +13,7 @@
 # limitations under the License.
 
 
-VERSION = '3.3.0'
+VERSION = '3.3.1'
 # This is the release number for the RPM builds
 RELEASE = 1
 CUR_API_VERSION = 'v2'
diff --git a/tower_cli/models/base.py b/tower_cli/models/base.py
index 69ed215..16fe84d 100644
--- a/tower_cli/models/base.py
+++ b/tower_cli/models/base.py
@@ -558,7 +558,6 @@ class BaseResource(six.with_metaclass(ResourceMeta)):
                 cursor = self.list(**dict(kwargs, page=cursor['next']))
                 response['results'] += cursor['results']
                 response['count'] += cursor['count']
-            response['next'] = None
 
         # Done; return the response
         return response
diff --git a/tower_cli/resources/organization.py b/tower_cli/resources/organization.py
index 73e13fd..7e287a4 100644
--- a/tower_cli/resources/organization.py
+++ b/tower_cli/resources/organization.py
@@ -26,4 +26,3 @@ class Resource(models.Resource):
     users = models.ManyToManyField('user', method_name='')
     admins = models.ManyToManyField('user', method_name='admin')
     instance_groups = models.ManyToManyField('instance_group', method_name='ig')
-    custom_virtualenv = models.Field(required=False, display=False)
diff --git a/tower_cli/resources/project.py b/tower_cli/resources/project.py
index 0df18ef..de1b21f 100644
--- a/tower_cli/resources/project.py
+++ b/tower_cli/resources/project.py
@@ -59,7 +59,6 @@ class Resource(models.Resource, models.MonitorableResource):
     scm_update_cache_timeout = models.Field(type=int, required=False, display=False)
     job_timeout = models.Field(type=int, required=False, display=False,
                                help_text='The timeout field (in seconds).')
-    custom_virtualenv = models.Field(required=False, display=False)
 
     @resources.command
     @click.option('--monitor', is_flag=True, default=False,
@@ -151,7 +150,7 @@ class Resource(models.Resource, models.MonitorableResource):
     @resources.command(use_fields_as_options=(
         'name', 'description', 'scm_type', 'scm_url', 'local_path',
         'scm_branch', 'scm_credential', 'scm_clean', 'scm_delete_on_update',
-        'scm_update_on_launch', 'job_timeout', 'custom_virtualenv'
+        'scm_update_on_launch', 'job_timeout'
     ))
     def modify(self, pk=None, create_on_missing=False, **kwargs):
         """Modify an already existing.


Test patch:
diff --git a/tests/test_resources_job.py b/tests/test_resources_job.py
index 3f9b2b0..f73a960 100644
--- a/tests/test_resources_job.py
+++ b/tests/test_resources_job.py
@@ -577,7 +577,7 @@ class ListStatusesTests(unittest.TestCase):
             self.assertEqual(result, {
                 'count': 5,
                 'previous': None,
-                'next': None,
+                'next': 2,
                 'results': [{
                     'elapsed': 0.0,
                     'failed': False,