* Misc updates
doUpdateCustomer - skip API call if user didn't update anything
getPhoto - handle uknkown user and user with no photo
doLabel, updateLabels - cleanup, make consistent
doGetGroupInfo - set settings in all cases to avoid having to use try/except
doPrintGroupMembers - message_attributes not used
* Give error when no arguments
* Update user attribute handling
User attribite type handling issues.
Custom types have their case lowered.
* Use custom keyword as part of type
Old - address, im, phone: type a|b|c|(custom <String>)
New - address, im, phone: type a|b|c|<String>
Dropping custom keyword will break existing scripts
* Use separate keyword for custom type
Old - organization: (type a|b|c) | (customtype <String>)
New - organization: (type a|b|c|<String>)
Dropping customtype keyword will break existing scripts
Unlike all other attributes, you do not set type: custom when customType is set
* Use implied custom
Old - location: type a|b|c|<String>
New - location: type a|b|c|<String>
No change
* Use implied custom, no type keyword
Old - externalid, otheremail, relation, website: a|b|c|<String>
New - externalid, otheremail, relation, website: a|b|c|<String>
No change
This update normalizes the type handling.
Case of custom types is preserved.
In update, for all fields, you can do:
a|b|c|<String>
a|b|c|custom <String>
customtype <String> is still allowed for organization for backward compatability.
* Just in case user does type work and then customtype xxx
* Update documentation
* Update update group
Allow plurals of roles, otherwise bad things happen; for example, in the following members isn't taken as the role, it's taken as the list of members (file file.txt is ignored) and the group is trashed.
gam update group group@domain.com sync members file file.txt
In sync, handle googlemail.com as a synonym for gmail.com and dots in googlemail.com/gmail.com addresses. For both the incoming list of members and the current members, the addresses are normalized and then the adds/remove are determined. The actual address is used in the add/remove.
* _cleanConsumerAddress it is
* Update doUpdateCros
Only use moveDevicesToOu if the only field being updated is orgUnitPath; otherwise orgUnitPath will be updated in the loop with whatever other fields are being updated
* Only show count of devices in error message
* Always user moveDevicesToOu to update CrOS OU
* Minor locations/sshPublicKeys cleanup
Make options names internally consistent and consistent with other commands.
Drop publicsshkeys, too may choices
Change title to SSH Public Keys to match Google's title
* Simplify UserAttributes
* Standardize callGAPIpages calls; cleanup new Vault code
All calls to callGAPIpages include the items parameter; none of them omit it and take the default value u'items'; thus items can be a positional parameter and the items= in each of the calls can be omitted. Previously, some calls had item= and others didn't.
Cleaned up Vault argument processing.
Clean up some pylint complaints.
* Correct convertUserUIDtoEmail calls in doGetVaultxxxInfo
* Allow listlimit -1 in print mobile devices
appslimit = -1 and listlimit -1: show no repeating elements
appslimit = 0 and listlimit 0: show all repeating elements
appslimit = N and listlimit N: show N repeating elements
* Upgrade gam update group to use API batch processing
This allows gam update group sync commands to be used in gam batch and gam csv commands.
Add/delete/update and clear will be faster due to batching.
GAPI exception handling improved to support additional error checking.