- This topic has 2 replies, 2 voices, and was last updated 2 years ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forums › FABRIC General Questions and Discussion › Acceptable characters in NetworkService name
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:
slice.get_networks()
is empty./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.
Thanks we will check. Most likely we will tighten the regex for setting the name in the first place.
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.