Ravello Service

Get Involved. Join the Conversation.

Topic

    Luc Dekens
    Name field in the new network components not consistently...Answered
    Topic posted July 15, 2018 by Luc DekensBlue Ribbon: 750+ Points, last edited December 31, 2018 by Arijit ChakrabortyBronze Trophy: 5,000+ Points, tagged Tip 
    228 Views, 6 Comments
    Title:
    Name field in the new network components not consistently used
    Summary:
    The optional name field in the new network components can be set, but it's not returned when not set. And apparently completely ignored by the Web GUI.
    Content:

    With the new network components (subnet,switch,port and the services: router,DNS,DHCP), there is an optional name field that can be set when calling the create REST API for each these.
    But, the name field is not returned when retrieving one of the network components when the name is not set at creation time.
    The name field is returned when it was set at creation time.
    Shouldn't the 'get' function always return the name field, even when not set or blank?
    Now the REST API method to 'get' one of these components returns different objects, depending on whether the name field was set or not at creation time.
    Consistency of the returned objects would be preferred imho.

    On a side-note, when the name field is set, the Web GUI keeps using the default names (Router1, DNS Server 1...)

    Best Comment

    Simon Law

    Hi Luc,

    This is how the names are generated. They are sequenced based on the order of creation, such as switch1, switch2 and switch3. However, the names are not fixed, so you delete switch2, the former switch3 will now become switch2. Hence if you want to have a fixed name, then you should set it at creation time.

    Hope this helps

    -Simon

     

    Comment

     

    • Simon Law

      Just to clarify, is the problem you are having is that you are trying to change the fields in the network tab by using REST API and when you enter the UI it's still showing the default names of the network components? 
      In addition, could you please create a BP and share the name of it? So I can get support to investigate this further?

      -Simon

    • Luc Dekens

      Looks like I can't recreate the issue in the web GUI anymore. Now I see the correct names.

      But the REST API still does not return a Name field when it is not set.

      See the attached REST API trace

      This is from a sample application NameIssue (appid 3125669594349), where I added 2 additional routers, one with and one without a name.
       

    • Simon Law

      Hi Luc,

      Checked with the product team, this is by design. The name is returned only if it is set.

      -Simon

       

      • Luc Dekens

        Ok, good to know.

        Is there any doc on how the default names (Router1, Router2...) areassigned?

        In  order of creation?

    • Simon Law

      Hi Luc,

      This is how the names are generated. They are sequenced based on the order of creation, such as switch1, switch2 and switch3. However, the names are not fixed, so you delete switch2, the former switch3 will now become switch2. Hence if you want to have a fixed name, then you should set it at creation time.

      Hope this helps

      -Simon

       

    • Luc Dekens

      Got it.