- This topic has 4 replies, 3 voices, and was last updated 3 years, 3 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Home › Forums › FABRIC General Questions and Discussion › How to view components of active slice
Tagged: components, slice, sliver
Currently, users are able to view all available resources on the FABRIC framework through the advertised_topology method. However, I cannot seem to figure out how to view the specific resources of an active slice, even after digging through the API documentation on GitHub.
Is there a method or workaround to view the components of an active slice? Any pointers would be appreciated. Thanks!
Does the slivers method do it?
Like in this notebook: https://github.com/fabric-testbed/jupyter-examples/blob/master/fabric_examples/basic_examples/get_slivers.ipynb
`
Unfortunately not, the sliver_status method provides the name, site, capacities, states, and a lot of other information but not what the actual components are…
User should be able to get to the respective node components using the get_slice API:
`
status, topology = slice_manager.get_slice(slice_id=slice_id)
if status == Status.OK:
print(f”Properties: {topology.nodes[‘n1’].list_properties()}”)
print(f”Components: {topology.nodes[‘n1’].components}”)
print(f”Component: {topology.nodes[‘n1’].components[‘c1’]}”)
else:
print(f”Failed to get slice topology: {topology}”)
`
However, I think we have bug which is preventing the components from being listed in the output of the above snippet.
I think I have figured it out by using the topology.nodes structure with the get_property() method — I have included a screenshot showing some sample calls.
Thank you for your pointers!