Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-24333

User is able to set the same short URLs for different view instances

    XMLWordPrintableJSON

Details

    Description

      STR

      1. Let's say the user has CAPACITY-SCHEDULER view instance with /main/view/CAPACITY-SCHEDULER/auto_cs_instance short URL set
      2. Clone this instance or create another CAPACITY-SCHEDULER instance manually
      3. Set the same short URL as for the first instance

      Result

      • If 'Name' property is the same, request for adding new URL fails
        request:
        POST api/v1/view/urls/auto_cs_instance
        
        {
            "ViewUrlInfo": {
                "url_name": "auto_cs_instance",
                "url_suffix": "auto_cs_instance",
                "view_instance_version": "1.0.0",
                "view_instance_name": "AUTO_CS_INSTANCE_Copy",
                "view_instance_common_name": "CAPACITY-SCHEDULER"
            }
        }
        

        response:

        {
          "status" : 500,
          "message" : "An internal system exception occurred: This view URL name exists, URL names should be unique"
        }
        
      • If name is different, the REST call succeeds even if URL itself is duplicate:
        POST api/v1/view/urls/auto_cs_instance1
        
        {
            "ViewUrlInfo": {
                "url_name": "auto_cs_instance1",
                "url_suffix": "auto_cs_instance",
                "view_instance_version": "1.0.0",
                "view_instance_name": "AUTO_CS_INSTANCE_Copy",
                "view_instance_common_name": "CAPACITY-SCHEDULER"
            }
        }
        

        response is 201 in this case; URL is created

      • As result there are two view instances with the same URL, and the first one is no longer accessible by this URL
         

      Attachments

        Activity

          People

            smolnar Sandor Molnar
            smolnar Sandor Molnar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 10m
                2h 10m