<jupyter_start><jupyter_text>Get Advertised Topology<jupyter_code>from fabrictestbed_extensions.utils.testbed import Testbed
try:
    print(Testbed.get_advertised_topology())
except Exception as e:
    print (e)<jupyter_output>FABRIC Credential Manager   : cm.fabric-testbed.net
FABRIC Orchestrator         : orchestrator.fabric-testbed.net
(invalid_grant) expired refresh token<jupyter_text>Get Site Advertised Topology<jupyter_code>from fabrictestbed_extensions.utils.testbed import Testbed
site = None
try:
    site = Testbed.get_site_advertisment('STAR')
except Exception as e:
    print (e)
    
node = site
print("Site: {}".format(site))
print("      name             : {}".format(component.get_property(pname='name')))
print("      type             : {}".format(component.get_property(pname='type')))
print("      cpu              : {}".format(component.get_property(pname='capacities').cpu))
print("      core             : {}".format(component.get_property(pname='capacities').core))
print("      ram              : {}".format(component.get_property(pname='capacities').ram))
print("      disk             : {}".format(component.get_property(pname='capacities').disk))
print("      unit             : {}".format(component.get_property(pname='capacities').unit))
print("      capacity_allocations : {}".format(component.get_property(pname='capacity_allocations')  ))

print("   Components        :")
for component_name, component in node.components.items():
    print("      component             : {}".format(component))
    print("      Name             : {}".format(component.name))
    print("      Unit             : {}".format(component.get_property(pname='capacities').unit))
    print("      Model            : {}".format(component.model))
    print("      Type             : {}".format(component.type))
print("   Interfaces        : {}".format(node.interfaces))
print()<jupyter_output>FABRIC Credential Manager   : cm.fabric-testbed.net
FABRIC Orchestrator         : orchestrator.fabric-testbed.net
Site: {'capacities': '{ cpu: 12 , core: 384 , ram: 3,072 G, disk: 19,200 G, unit: 6 }', 'capacity_allocations': '{ core: 176 , ram: 176 G, disk: 248 G}', 'location': '{"postal": "710 North Lake Shore Dr,Chicago, IL  60611"}', 'name': 'STAR', 'site': 'STAR', 'type': 'Server'}
      name             : SmartNIC-ConnectX-6
      type             : SmartNIC
      cpu              : 0
      core             : 0
      ram              : 0
      disk             : 0
      unit             : 2
      capacity_allocations : None
   Components        :
      component             : {'capacities': '{ unit: 6 }', 'capacity_allocations': '{ unit: 3 }', 'model': 'Tesla T4', 'name': 'GPU-Tesla T4', 'type': 'GPU'}
      Name             : GPU-Tesla T4
      Unit             : 6
      Model            : Tesla T4
      Type             : GPU
      component             : {'capacities': '{ unit[...]<jupyter_text>Delete All Slices<jupyter_code>from fabrictestbed_extensions.utils.slice import SliceUtils
try:
    SliceUtils.delete_all()
except Exception as e:
    print (e)<jupyter_output>FABRIC Credential Manager   : cm.fabric-testbed.net
FABRIC Orchestrator         : orchestrator.fabric-testbed.net
Deleting Slice: Test-3_1_2_7XX-68-SharedNIC_ConnectX_6-STAR.  Response Status Status.OK
Deleting Slice: Test-3_1_2_7XX-4-SharedNIC_ConnectX_6-STAR.  Response Status Status.OK
Deleting Slice: Test-3_1_2_7XX-6-SharedNIC_ConnectX_6-STAR.  Response Status Status.OK
Deleting Slice: Test-3_1_2_7XX-7-SharedNIC_ConnectX_6-STAR.  Response Status Status.OK
Deleting Slice: Test-3_1_2_7XX-0-SharedNIC_ConnectX_6-STAR.  Response Status Status.OK
Deleting Slice: Test-3_1_2_7XX-2-SharedNIC_ConnectX_6-STAR.  Response Status Status.OK
Deleting Slice: Test-3_1_2_7XX-3-SharedNIC_ConnectX_6-STAR.  Response Status Status.OK
Deleting Slice: Test-3_1_2_7XX-5-SharedNIC_ConnectX_6-STAR.  Response Status Status.OK
Deleting Slice: Test-3_1_2_7XX-1-SharedNIC_ConnectX_6-STAR.  Response Status Status.OK
Deleting Slice: Test-3_1_2_7XX-8-SharedNIC_ConnectX_6-STAR.  Response Status Status.OK
Deleting Slice:[...]<jupyter_text>Delete All with Substring<jupyter_code>from fabrictestbed_extensions.utils.slice import SliceUtils
try:
    SliceUtils.delete_all_with_substring("Test-3_1_2_700")
except Exception as e:
    print (e)<jupyter_output>FABRIC Credential Manager   : cm.fabric-testbed.net
FABRIC Orchestrator         : orchestrator.fabric-testbed.net
Deleting Slice: Test-3_1_2_700-1-SharedNIC_ConnectX_6-STAR.  Response Status Status.FAILURE
Deleting Slice: Test-3_1_2_700-8-SharedNIC_ConnectX_6-STAR.  Response Status Status.FAILURE
Deleting Slice: Test-3_1_2_700-9-SharedNIC_ConnectX_6-STAR.  Response Status Status.FAILURE
Deleting Slice: Test-3_1_2_700-11-SharedNIC_ConnectX_6-STAR.  Response Status Status.FAILURE
Deleting Slice: Test-3_1_2_700-16-SharedNIC_ConnectX_6-STAR.  Response Status Status.FAILURE
Deleting Slice: Test-3_1_2_700-17-SharedNIC_ConnectX_6-STAR.  Response Status Status.FAILURE
Deleting Slice: Test-3_1_2_700-18-SharedNIC_ConnectX_6-STAR.  Response Status Status.FAILURE
Deleting Slice: Test-3_1_2_700-22-SharedNIC_ConnectX_6-STAR.  Response Status Status.FAILURE
Deleting Slice: Test-3_1_2_700-24-SharedNIC_ConnectX_6-STAR.  Response Status Status.FAILURE
Deleting Slice: Test-3_1_2_700-29-SharedNIC_ConnectX[...]<jupyter_text>Delete Slice<jupyter_code>from fabrictestbed_extensions.utils.slice import SliceUtils
slice_id = None
slice_name = "Test-3_1_2-a-3-GPU_Tesla_T4-TACC"
try:
    SliceUtils.delete_slice(slice_name=slice_name, slice_id=slice_id)
except Exception as e:
    print (e)<jupyter_output>FABRIC Credential Manager   : cm.fabric-testbed.net
FABRIC Orchestrator         : orchestrator.fabric-testbed.net
Slice not found name: Test-3_1_2-a-3-GPU_Tesla_T4-TACC, slice_id: None<jupyter_text>Get All Slices<jupyter_code>from fabrictestbed_extensions.utils.slice import SliceUtils
try:
    SliceUtils.list_all_slices()
except Exception as e:
    print (e)<jupyter_output>FABRIC Credential Manager   : cm.fabric-testbed.net
FABRIC Orchestrator         : orchestrator.fabric-testbed.net
test_harness_latency_mtu_bandwidth | ac2e4a8e-e5ad-4f2a-9775-7b3b1b899f0e | StableOK<jupyter_text>Get Slice Error (by ID only)<jupyter_code>from fabrictestbed_extensions.utils.slice import SliceUtils

slice_id = "1fcf2af5-58ba-441a-b52f-f8f3b6d83f21"
try:
    for notice in SliceUtils.get_slice_error(slice_id):
        print("Slice notice: \n{}".format(str(notice)))
    
except Exception as e:
    print (e)<jupyter_output>FABRIC Credential Manager   : cm.fabric-testbed.net
FABRIC Orchestrator         : orchestrator.fabric-testbed.net
Slice notice: 
Reservation 6ef5b522-818f-483d-a8b1-6fc3be50e691 (Slice Test-3_1_2_7XX-85-SharedNIC_ConnectX_6-STAR(1fcf2af5-58ba-441a-b52f-f8f3b6d83f21) Graph Id:af302d24-8f4d-4856-b1cc-ac7ca71b144f Owner:name: orchestrator guid: orchestrator-guid email: <EMAIL> State:Closing ) is in state [Closed,None_]

Last ticket update: Insufficient resources : ['core']
Ticket events: 
Last ticket update:<jupyter_text>Get Slice by NameGets and slice by name but does not return "Closing" or "Dead" slices.<jupyter_code>from fabrictestbed_extensions.utils.slice import SliceUtils
try:
    slice = SliceUtils.get_slice(slice_name='Test-3.1.2-a-2-GPU_RTX6000-UTAH')
except Exception as e:
    print (e)
    
print(slice)<jupyter_output><empty_output><jupyter_text>Get Slice by Slice_IDGets and slice by id but does not return "Closing" or "Dead" slices.<jupyter_code>from fabrictestbed_extensions.utils.slice import SliceUtils
try:
    slice = SliceUtils.get_slice(slice_id="2af0810e-648d-48dc-90e6-67e5aed2a475")
except Exception as e:
    print (e)
    
print(slice)<jupyter_output><empty_output><jupyter_text>Wait for Slice<jupyter_code>from fabrictestbed_extensions.utils.slice import SliceUtils
try:
    SliceUtils.wait_for_slice(slice_name='HF_STAR',slice_id=None,timeout=360,interval=10,progress=True)
except Exception as e:
    print (e)<jupyter_output><empty_output><jupyter_text>Exceute Script on Node<jupyter_code>from fabrictestbed_extensions.utils.node import NodeUtils

script= '#!/bin/bash  \n' \
        'echo Hello, FABRIC from node `hostname -s`   \n'

try:
    SliceUtils.execute_script('centos', node, script)
except Exception as e:
    print (e)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10862006953602686, 'fraction_numerical': 0.040402829396954804, 'mean_word_length': 4.083485679463742, 'pattern_counts': {'":': 1, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '11', 'dir': 'jupyter-structured-clean-dedup', 'id': '238501', 'license': 'MIT', 'n_tokens_mistral': 3164, 'n_tokens_neox': 2972, 'n_words': 550, 'path': 'fabric_examples/beta_functionality/fabric_utils.ipynb', 'repo_name': 'fabric-testbed/jupyternb-template', 'size': '8353'}