* Allow : in row filter field names
export GAM_CSV_ROW_FILTER="'\"accounts:used_quota_in_mb\":count>=15000'"
* Updated code to handle Directory API issue that prevents looking up the orgUnitId of OU /
This affected `gam report` if you used the `orgunit /` option.
This affected `gam create admin <UserItem> <RoleItem> org_unit /`.
* Move transport customizations to their own module
This helps to accomplish a few things:
1) Makes the forced user-agent customization on HTTP requests a bit
clearer by subclassing the targeted objects (as opposed to hiding the
behavior behind a forced override of the google_auth_httplib2 object
methods)
2) Standardizes the creation of HTTP objects. These objects can still
largely be customized, but using a single creation mechanism will
standardize a default and streamline creation, thereby decreasing the
code that would otherwise be replicated in the caller
3) Moves create_http() to a more general purpose module, since it will
likely be used by more than gapi-related methods.
* Use string values for TLS version tests
More closely matches [existing
behavior](4fb73e6073/src/var.py (L853))
that sets the global default to a string value.
Requires use of a context manager within each test method for stdout/stderr patches, rather than the @patch.object decorator. Otherwise, the test runner hijacks the patched object before the method under test can use it.
Note: The `--buffer` switch in the unittest module will suppress all
output during the test, unless the test fails. However, with this implementation, anything that would have been printed to the streams within
the context manager will not be reflected in the test runner's output,
should the test fail.
See more in jay0lee/GAM#1068
* Cleanup
gam,py:
In show sakays, only mark USER-MANAGED keys as current: true/false
gapi/__init__.py:
pylint cleanup: import order, indentation
gapi/errors.py:
pylint cleanup: import order, unused import, indentation
Recognize 502 Bad Gateway/Gateway Timeout: treat as retryable errors
This last change does not directly handle the refresh problem in Issue #1063 but in my version this seems to be the right solution to the 502 gateways errors
* In show sakeys, indicate whcij key was used to authenticate
* Show all sakeys by default
* Include unused import
* Remove unused import, fix unit tests
* When rotating an sakey, only delete the existing key, no others
* Make sakeys retention explicit
* Fix bug
* Rotate, local key generation default
* Allow explicit specification of retain_none in rotate sakeys
It is still the default value.
* Move file utilities and add tests
Separates common file operations into their own component with
appropriate unit tests.
* Remove use of unittest.mock.mock_open
Its behavior is slightly different across Python 3.5, 3.6, and 3.7
making it difficult to test across Python versions.
* Move callGAPIItems and add unit tests
* Move the page-related call() methods and add tests
Continues work on jay0lee/GAM#147
* Account for rand addition that rounds to 1.0
In this case, sleep time could be equal to 61
* Begin breaking apart gam.py into logical pieces
Start with one of the deepest parts of the stack, Google API request execution calls and associated errors. Critical information printing functions and application control logic are also broken out into their own components.
This change also adds unit tests for migrated content and makes code more PEP8 compliant.
This commit starts work on jay0lee/GAM#147
* Add unit tests to Travis config
* Swap assert_called_once() with assertEqual() and Mock.call_count
Makes tests compatible with Python 3.5. assert_called_once() is only available in Python 3.6+
Updated `gam delete labels` to process labels in reverse hierarchial order to avoid deleting a parent label before all of its child labels are deleted.