1. Acceptable characters in NetworkService name

Acceptable characters in NetworkService name

Home Forums FABRIC General Questions and Discussion Acceptable characters in NetworkService name

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3480
    yoursunny
    Participant

      I notice that if a NetworkService name contains the character :, the slice could be created but there’s API error during usage.

      import time
      
      from fabrictestbed_extensions.fablib.fablib import \
          FablibManager as fablib_manager
      
      fablib = fablib_manager()
      sliceNum = int(time.time())
      sliceName = f'netname@{sliceNum}'
      print(sliceName)
      
      slice = fablib.new_slice(name=sliceName)
      nodeA = slice.add_node(name='A', site='UTAH', image='default_ubuntu_22')
      [intfA] = nodeA.add_component(model='NIC_Basic', name='N').get_interfaces()[:1]
      slice.add_l3network(name='N:0', interfaces=[intfA], type='IPv4')
      slice.submit()
      
      slice = fablib.get_slice(name=sliceName)
      for net in slice.get_networks():
          print(f'{net}')
      

      This script creates a slice with a NetworkService named N:0.
      The slice can be created and it enters StableOk status.
      However:

      • In API, slice.get_networks() is empty.
      • If the script was pasted into Jupyter Hub, the table of network interfaces contains the network interface but it’s not attached to any network.
      • In portal, /slices/<uuid> endpoint does not open. It shows error “Failed to load the slice” (which is true) and “User’s credential is expired” (which is false and misleading).

      Slice 73b860c7-126d-4384-99d9-d960229d0d3b was created with this script, if operator wants to have a look.
      Suggestion is blocking slice.submit() call if the NetworkService name is unacceptable.

      #3483
      Ilya Baldin
      Participant

        Thanks we will check. Most likely we will tighten the regex for setting the name in the first place.

        #3485
        Ilya Baldin
        Participant

          We checked – the “:” is not liked by the network control service. For release 1.4 we are adding regex checkers for different element names – they will have different regexes depending on what’s allowed for the particular topology element class and will flag as soon as you set the name, so no need to wait for submit.

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.