Cumulocity CLI 2.40.0
What's Changed
New commands
Manage UI plugins using c8y ui
- #354
Introducing support for management of Cumulocity IoT Plugins. Management of UI plugins is much easier now and can be easily integrated into CI/CD pipelines.
Checkout the examples page to get a quick overview of some common ui plugin management tasks.
Deploying new plugins versions is a simple as:
# From a file
c8y ui plugins create --file "myplugin.zip"
# From a URL
c8y ui plugins create --file "https://github.com/thin-edge/tedge-container-plugin/releases/download/1.2.3/tedge-container-plugin-ui_1.0.2.zip"
Then you can install the plugin the plugin within an existing UI application
c8y ui applications plugins install --application devicemanagement --plugin tedge-container-plugin-ui@latest
Or you can activate existing shared plugins provided by the parent tenant using:
c8y ui applications plugins install --application devicemanagement --plugin "Asset Overview Plugin"
New features
Support piping pretty printed json #345
Finally you don't need to pipe json as minimified (non pretty printed json), both minified or pretty printed json objects are accepted.
Previously the following command would fail as the input was assumed to be json lines, which then resulted in json parsing errors:
echo "{
\"id\": "1"
}" | c8y devices get --dry
But now the input will be parsed correctly as a single json object which spans multiple lines:
What If: Sending [GET] request to [https://example.cumulocity.com/inventory/managedObjects/1]
### GET /inventory/managedObjects/1
| header | value
|-------------------|---------------------------
| Accept | application/json
| Authorization | Bearer {token}
Hide sensitive info by default - #361
By default sensitive information will be obfuscated in the logging and in the dry run output. Previously this setting was disabled by default, however user feedback indicated that it would be better to include default settings which result in less accidental leakage of password when users are presenting something or sharing their screen.
By default the dry run output will look like the following:
% c8y devices list --dry
What If: Sending [GET] request to [https://example.cumulocity.com/inventory/managedObjects?q=%24filter%3D+%24orderby%3Dname]
### GET /inventory/managedObjects?q=$filter= $orderby=name
| header | value
|-------------------|---------------------------
| Accept | application/json
| Authorization | Bearer {token}
As before you can control the setting using:
c8y settings update logger.hideSensitive false
New client side filter operators: includes and notincludes
Arrays of strings, numbers and boolean values can be filtered by checking if the array includes or does not include a value.
array includes a value
c8y template execute --template "{items:['one','two']}" | c8y util show --filter "items includes two"
array does not include a value
c8y template execute --template "{items:['one','two']}" | c8y util show --filter "items notincludes other"
Minor features
-
set-session
: ignore existing token if it is not valid for a minimum duration in #363 -
c8y microservices create
: support updating roles property from a given microservice manifest file in #359 -
c8y application list
: add support fortenant
andhasVersions
filters in #355 -
c8y application list
: add support foravailability
filter -
extensions: support new
formDataFile
type to control setting a file in multiform/data uploads
Fixes
- extensions: correct link to extensions tutorial in #351
Full Changelog: v2.39.3...v2.40.0