Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-19378

Remove before and after blocks for unchanged entities in the api method configuration.importcompare

    XMLWordPrintable

Details

    • Team B
    • Sprint 76 (May 2021), Sprint 77 (Jun 2021), Sprint 78 (Jul 2021), Sprint 79 (Aug 2021), Sprint 80 (Sep 2021), Sprint 81 (Oct 2021)
    • 2

    Description

      Steps to reproduce:

      1. Create template with item and trigger
      2. Get template import "source" data to use it further in api
      3. Change trigger name
      4. Send api request:
            "method": "configuration.importcompare",
            "params": {
                "format": "yaml",
                "rules": {
                    "groups": {
                        "createMissing": true,
                        "updateExisting": true
                    },
                    "templates": {
                        "createMissing": true,
                        "updateExisting": true
                    },
                    "items": {
                        "createMissing": true,
                        "updateExisting": true,
                        "deleteMissing": true
                    },
                    "triggers": {
                        "createMissing": true,
                        "updateExisting": true
                    }
                },
                "source": "zabbix_export:\n  version: '5.4'\n  date: '2021-05-14T13:18:53Z'\n  groups:\n    -\n      uuid: 3db9df077509459aaba109060764d431\n      name: apitemplate\n  templates:\n    -\n      uuid: 6bc7f3070e0842f3ace4a3606d8bb66e\n      template: apitemplate\n      name: apitemplate\n      groups:\n        -\n          name: apitemplate\n      items:\n        -\n          uuid: 477665165c274f5c98f10136aab236bc\n          name: apiitem\n          key: apiitem\n          triggers:\n            -\n              uuid: 4d23e9a921f84441bfcf7b74081c1c29\n              expression: last(/apitemplate/apiitem)=0\n              name: apitrigger\n"
            },
        

      Result:
      the output contains before and after blocks for the template and item, but there is no change there

      Expected:
      show before and after blocks only if it is different from before block.
      Also, if one of the parameters is set to false, for example, for trigger set ""updateExisting": false", then before and after blocks should not be either.

      Attachments

        Issue Links

          Activity

            People

              vmurzins Valdis Murzins
              natalja.zabbix Natalja Romancaka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: