mirror of
https://github.com/BroadbandForum/obuspa.git
synced 2025-12-20 01:03:40 +08:00
2025-06-06 v10.0.3: Bug fixes
Fixed - First object creation notification after bootup may be missed - CLI initiated event arguments do not support JSON formatted data - Provide better documentation for OBUSPA CLI -c commands - Removed .gitattributes file, as this causes problems when building OBUSPA for OpenWRT
This commit is contained in:
12
.gitattributes
vendored
12
.gitattributes
vendored
@@ -1,12 +0,0 @@
|
||||
*.git* export-ignore
|
||||
*.md export-ignore
|
||||
*.ac export-ignore
|
||||
*.am export-ignore
|
||||
Dockerfile export-ignore
|
||||
*.txt export-ignore
|
||||
CONTRIBUTING export-ignore
|
||||
LICENSE export-ignore
|
||||
*.ABOUT export-ignore
|
||||
/aboutcode export-ignore
|
||||
/src export-ignore
|
||||
/tests export-ignore
|
||||
@@ -1,5 +1,12 @@
|
||||
# OB-USP-AGENT Changelog since Release 10.0.0
|
||||
|
||||
## 2025-06-06 v10.0.3
|
||||
### Fixed
|
||||
- First object creation notification after bootup may be missed
|
||||
- CLI initiated event arguments do not support JSON formatted data
|
||||
- Provide better documentation for OBUSPA CLI -c commands
|
||||
- Removed .gitattributes file, as this causes problems when building OBUSPA for OpenWRT
|
||||
|
||||
## 2025-05-27 v10.0.2
|
||||
### Fixed
|
||||
- Code should compile with --disable-bulkdata (regression introduced in v10.0.1)
|
||||
|
||||
@@ -197,7 +197,33 @@ For example, to query the value of all parameters in the DeviceInfo object when
|
||||
$ obuspa -c get "Device.DeviceInfo."
|
||||
```
|
||||
|
||||
The CLI mode also supports adding and deleting instances of data model objects and running USP commands.
|
||||
* For example to add a bulk data profile use:
|
||||
```
|
||||
$ obuspa -c add "Device.BulkData.Profile."
|
||||
```
|
||||
|
||||
* For example to delete a bulk data profile using a search expression use:
|
||||
```
|
||||
$ obuspa -c del "Device.BulkData.Profile.[Alias==\"cpe-1\"]."
|
||||
```
|
||||
|
||||
* For example to initiate a reboot, specifying input arguments use:
|
||||
```
|
||||
$ obuspa -c operate "Device.Reboot(Cause='LocalReboot',Reason='WebUI')"
|
||||
```
|
||||
|
||||
* For example to force OBUSPA to generate a Boot! event with arguments for testing purposes (assuming a subscription has also been setup) use:
|
||||
```
|
||||
$ obuspa -c event "Device.Boot!(CommandKey='R1', Cause='LocalReboot', FirmwareUpdated='false', ParameterMap='{\"Device.DeviceInfo.SerialNumber\":\"SN0001\"}' )"
|
||||
```
|
||||
|
||||
IMPORTANT: When using USP CLI commands you must be aware of the rules that the Bash shell places on command lines.
|
||||
In particular, each argument to the USP CLI command usually needs to be enclosed by double-quotes,
|
||||
and double-quotes within the CLI command's arguments must be escaped with a backslash character.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## OB-USP-AGENT Source Tree
|
||||
The /src directory contains the following subdirectories:
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
about_resource: .
|
||||
name: obuspa
|
||||
version: 4.1
|
||||
version: 10.0.0
|
||||
homepage_url: https://github.com/BroadbandForum/obuspa
|
||||
download_url: https://github.com/BroadbandForum/obuspa/archive/refs/tags/v4.1.0-master.tar.gz
|
||||
download_url: https://github.com/BroadbandForum/obuspa/releases/download/v10.0.0-master/obuspa-10.0.0.tar.gz
|
||||
licenses:
|
||||
- key: bsd-new
|
||||
name: BSD-3-Clause
|
||||
file: LICENSE
|
||||
spdx_license_key: BSD-3-Clause
|
||||
copyright: |
|
||||
Copyright (C) 2019-2021, Broadband Forum
|
||||
Copyright (C) 2016-2021 CommScope, Inc
|
||||
Copyright (C) 2019-2025, Broadband Forum
|
||||
Copyright (C) 2024-2025, Vantiva Technologies SAS
|
||||
Copyright (C) 2016-2024 CommScope, Inc
|
||||
Copyright (C) 2020-2021, BT PLC
|
||||
|
||||
|
||||
|
||||
@@ -740,7 +740,20 @@ exit:
|
||||
}
|
||||
}
|
||||
|
||||
// Reset the flag that prevents us resolving the subscription paths more than one per DM_EXEC processing cycle
|
||||
|
||||
// Clear the skip_obj_notifications flag for all subscriptions. This flag will have prevented notifications being generated above
|
||||
// for the baseline set of instances that existed when the subscription was first enabled.
|
||||
// So now we can reset it, as it's served it's purpose. The subscription should fire for all further matching object life events
|
||||
for (i=0; i < subscriptions.num_entries; i++)
|
||||
{
|
||||
sub = &subscriptions.vector[i];
|
||||
if (sub->skip_obj_notifications)
|
||||
{
|
||||
sub->skip_obj_notifications = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Reset the flag that prevents us resolving the subscription paths more than once per DM_EXEC processing cycle
|
||||
object_creation_paths_resolved = false;
|
||||
object_deletion_paths_resolved = false;
|
||||
}
|
||||
@@ -2847,7 +2860,6 @@ void ProcessObjectLifeEventSubscription(subs_t *sub)
|
||||
// obtaining a baseline set of objects (and hence should not fire any notifications from this subscription, but may fire notifications from others)
|
||||
if (sub->skip_obj_notifications)
|
||||
{
|
||||
sub->skip_obj_notifications = false; // Reset the flag, so that the subscription will fire notifications subsequently
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -410,11 +410,15 @@ int ParseExprComponent(char *buf, char **p_relative_path, expr_op_t *p_op, char
|
||||
return USP_ERR_INVALID_PATH_SYNTAX;
|
||||
}
|
||||
|
||||
// Exit if the expression constant still contains speech marks
|
||||
if (strchr(expr_const, '\"') != NULL)
|
||||
// Exit if the expression constant still contains speech marks. This is an error according to USP Spec Data Model Path Grammar BNF
|
||||
// However we allow it for CLI initiated USP command and event arguments, as they may contain JSON formatted data
|
||||
if (is_cli_parser == false)
|
||||
{
|
||||
USP_ERR_SetMessage("%s: Expression constant '%s' is not valid", __FUNCTION__, expr_const);
|
||||
return USP_ERR_INVALID_PATH_SYNTAX;
|
||||
if (strchr(expr_const, '\"') != NULL)
|
||||
{
|
||||
USP_ERR_SetMessage("%s: Expression constant '%s' is not valid", __FUNCTION__, expr_const);
|
||||
return USP_ERR_INVALID_PATH_SYNTAX;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert % escaped characters in the expression constant to their equivalent value
|
||||
|
||||
@@ -41,4 +41,4 @@
|
||||
*/
|
||||
|
||||
/* Lines below main version may include patch version numbers */
|
||||
#define AGENT_SOFTWARE_VERSION "10.0.2"
|
||||
#define AGENT_SOFTWARE_VERSION "10.0.3"
|
||||
|
||||
Reference in New Issue
Block a user