Make tedgeUrl optional when creating config_snapshot command
Is your feature improvement request related to a problem? Please describe.
The tedgeUrl property of the config_snapshot command should not be mandatory when creating a local operation.
Having the tedgeUrl mandatory makes it hard for custom mappers to use a consistent tedgeUrl path, and it error prone as the component creating the command request needs to know about the file transfer service.
For example, the following MQTT message is required to create a valid config_snapshot command, note the tedgeUrl property.
tedge mqtt pub 'te/device/main///cmd/config_snapshot/local-1234' '{
"status":"init",
"type":"tedge-configuration-plugin",
"tedgeUrl":"http://localhost:8005/tedge/file-transfer/config/tedge-configuration-plugin"
}' -r
Describe the solution you'd like
The following changes should be made
- the
tedgeUrlshould not be a mandatory property required by the tedge-agent when processing theconfig_snapshotcommand - If the
tedgeUrlproperty is not provided, the tedge-agent should set thetedgeUrlproperty itself.
After the above is implemented, it should be possible to create a config_snapshot using the following command:
tedge mqtt pub 'te/device/main///cmd/config_snapshot/local-1234' '{
"status":"init",
"type":"tedge-configuration-plugin"
}' -r
Describe alternatives you've considered
Additional context