vlrk

duplicate instance

Oct 9th, 2023
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.29 KB | None | 0 0
  1. [root@141179 udpst]# cat /etc/config/udpst/odl/udpst.odl
  2. %populate {
  3. object 'InternetGatewayDevice' {
  4. object 'IPLayerCapacityMetrics' {
  5. object 'X_ATT_ResultHistory' {
  6. instance add(1) {
  7. }
  8. }
  9. }
  10. }
  11. }
  12. [root@141179 udpst]# cat /etc/amx/udpst/udpst.odl
  13. %config {
  14. name = "udpst";
  15. import-dbg = true;
  16. rw_data_path = "/etc/config";
  17. save_file = "${rw_data_path}/${name}/${name}.odl";
  18.  
  19. // Application specific settings
  20. // persistent storage location
  21. storage-path = "${rw_data_path}/${name}/";
  22. //defaults_file = "${name}_defaults.odl";
  23. odl = {
  24. load-dm-events = false,
  25. dm-save = true,
  26. dm-save-on-changed = true,
  27. dm-save-delay = 1000,
  28. directory = "${storage-path}/odl"
  29. };
  30. definition_file = "${name}_definition.odl";
  31. defaults_file = "${name}_defaults.odl";
  32. }
  33.  
  34. import "${name}.so" as "${name}";
  35.  
  36. include "udpst_definition.odl";
  37. ?include "/etc/config/udpst/odl/udpst.odl":"udpst_defaults.odl";
  38. %define {
  39. entry-point udpst.udpst_main;
  40. }
  41. [root@141179 udpst]# cat /etc/amx/udpst/udpst_definition.odl
  42. %config {
  43. import-dbg = true;
  44. }
  45.  
  46. %define {
  47. %persistent object InternetGatewayDevice {
  48. %persistent object IPLayerCapacityMetrics {
  49. %persistent object X_ATT_ResultHistory[] {
  50. %read-only string Role;
  51. %read-only string DiagnosticsState;
  52. }
  53. }
  54. }
  55. }
  56. [root@141179 udpst]# cat /etc/amx/udpst/udpst_defaults.odl
  57. %populate {
  58. object InternetGatewayDevice.IPLayerCapacityMetrics.X_ATT_ResultHistory {
  59. instance add (0,"") {
  60. parameter 'Role' = "Test";
  61. parameter 'DiagnosticsState' = "Started";
  62. }
  63. }
  64. }
  65. [root@141179 udpst]# udpst
  66. [IMPORT-DBG] - dlopen - udpst.so (0x1ca1f60)
  67. [IMPORT-DBG] - symbol _udpst_main resolved (for udpst_main) from udpst
  68. [IMPORT-DBG] - symbols used of udpst = 1
  69. ERROR -- Here No backends specified
  70.  
  71. RK /usr/bin/mods/amxb/mod-amxb-ubus.so -
  72. ERROR : 13 - Duplicate instance@/etc/config/udpst/odl/udpst.odl:line 5
  73. xxx 3
  74. ^CERROR : 13 - Duplicate instance@/etc/config/udpst/odl/udpst.odl:line 5
  75. xxx 3
  76.  
Advertisement
Add Comment
Please, Sign In to add comment