Uploaded image for project: 'Active and Available Inventory'
  1. Active and Available Inventory
  2. AAI-1923

Problem deleting due to EdgeRules in CCVPN usecase Casablanca

    Details

      Description

      Since Casablanca branch has been created, master branch is for Dublin now.
      AAI-1923 needs to be fixed on both branches.
      In Casablanca branch, this probably means EdgeRule change only.
      In Dublin branch, this may mean both EdgeRule change and code changes.

      While testing on Casablanca branch for AAI-1915, I created the ext-aai-info with embedded esr-system-info as per comments on that case.

      When I tried to do a DELETE on the ext-aai-network:

      > DELETE /aai/v14/network/ext-aai-networks/ext-aai-network/createAndDelete?resource-version=1542247826990 HTTP/1.1
      

      I get back:

      < HTTP/1.1 400 Bad Request
      {
        "requestError": {
          "serviceException": {
            "messageId": "SVC3100",
            "text": "Unsupported operation %1 (msg=%2) (ec=%3)",
            "variables": [
              "DELETE",
              "Node cannot be deleted:Object is being reference by additional objects preventing it from being deleted. Please clean up references from the following types [ext-aai-network]",
              "ERR.5.4.6110",
              "network/ext-aai-networks/ext-aai-network/createAndDelete"
            ]
          }
        }
      }
      

      I figured it was something to do with the embedded esr-system-info, so tried to DELETE that first:

      > DELETE /aai/v14/network/ext-aai-networks/ext-aai-network/createAndDelete/esr-system-info/test-esr-system-info-id-val-0?resource-version=1542247826995 HTTP/1.1
      

      But I got another error:

      < HTTP/1.1 400 Bad Request
      {
        "requestError": {
          "serviceException": {
            "messageId": "SVC3100",
            "text": "Unsupported operation %1 (msg=%2) (ec=%3)",
            "variables": [
              "DELETE",
              "Node cannot be deleted:Object is being reference by additional objects preventing it from being deleted. Please clean up references from the following types [ext-aai-network]",
              "ERR.5.4.6110",
              "network/ext-aai-networks/ext-aai-network/createAndDelete/esr-system-info/test-esr-system-info-id-val-0"
            ]
          }
        }
      }
      

      So, now I appear to be stuck with objects that cannot be deleted.

      Is there something wrong with the EdgeRules setup for this relationship?

      	{
      		"from": "ext-aai-network",
      		"to": "esr-system-info",
      		"label": "org.onap.relationships.inventory.Uses",
      		"direction": "OUT",
      		"multiplicity": "ONE2MANY",
      		"contains-other-v": "${direction}",
      		"delete-other-v": "${direction}",
      		"prevent-delete": "!${direction}",
      		"default": "true",
      		"description":"For CCVPN Usecase"
      	},
      

      Is there another recovery method, apart from fixing the EdgeRules and re-deploying it?

      Update: the lan-port-config to dhcp-service EdgeRule has the same configuration as ext-aai-network to esr-system-info, so that should be updated as well:

       	{
       		"from": "lan-port-config",
       		"to": "dhcp-service",
       		"label": "org.onap.relationships.inventory.Uses",
       		"direction": "OUT",
       		"multiplicity": "ONE2MANY",
       		"contains-other-v": "${direction}",
       		"delete-other-v": "${direction}",
       		"prevent-delete": "!${direction}",
       		"default": "true",
       		"description":"For CCVPN Usecase"
       	},
      

      Other EdgeRules that have this apparently bad combo of properties:

       		"delete-other-v": "${direction}",
       		"prevent-delete": "!${direction}",
      

      includes

      • pnf to network-resource
      • logical-link to ext-aai-network
      • vpn-binding to ext-aai-network
      • pnf to ext-aai-network
      • connectivity to ext-aai-network
      • lan-port-config to ext-aai-network
      • network-resource to ext-aai-network
      • site-resource to ext-aai-network
      • sdwan-vpn to ext-aai-network
      • device to ext-aai-network
      • wan-port-config to ext-aai-network

        Attachments

          Issue Links

          # Subject Branch Project Status CR V

            Activity

              People

              • Assignee:
                jimmydot James Forsyth
                Reporter:
                keong Keong Lim
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: