Automatic Out-of-band Management (OOB)

View as Markdown

Configuring OOB during importing

Clients can specify that they would like an OOB network to be automatically configured on top of their simulation’s primary network at the time of creation via JSON or DOT file importing.

Explicitly add OOB on import

from air_sdk import AirApi
from air_sdk.endpoints import Simulation
api = AirApi.with_ngc_config()
# Or use SAK directly
# api = AirApi.with_api_key(api_key='nvapi-xyz')
json_data = {
'format': 'JSON',
'name': 'JSON Sim',
'content': {
'nodes': {
'node1': {
'cpu': 2,
'memory': 1024,
'storage': 10,
'os': 'generic/ubuntu2204',
'cpu_arch': 'x86',
},
},
'oob': True, # <--- # This explicitly tells Air to add an OOB network
},
}
sim: Simulation = api.simulations.import_from_data(**json_data)
sim.auto_oob_enabled
True

Explicitly tell Air NOT to add OOB

from air_sdk.endpoints import Simulation
json_data = {
'format': 'JSON',
'name': 'JSON Sim',
'content': {
'nodes': {
'node1': {
'cpu': 2,
'memory': 1024,
'storage': 10,
'os': 'generic/ubuntu2204',
'cpu_arch': 'x86',
},
},
'oob': False, # <--- # This explicitly tells Air NOT to add an OOB network
},
}
sim: Simulation = api.simulations.import_from_data(**json_data)
sim.auto_oob_enabled
False

Implicitly add OOB

from air_sdk.endpoints import Simulation
json_data = {
'format': 'JSON',
'name': 'JSON Sim',
'content': {
'nodes': {
'node1': {
'cpu': 2,
'memory': 1024,
'storage': 10,
'os': 'generic/ubuntu2204',
'cpu_arch': 'x86',
},
},
# Excluding the `oob` key from the payload
# implicitly tells Air to add an OOB network
},
}
sim: Simulation = api.simulations.import_from_data(**json_data)
sim.auto_oob_enabled
True

Toggling On/Off Automatic OOB

After a simulation has been created, the automatic OOB network may be toggled On/Off of an existing simulation.

Toggling On Automatic OOB

from air_sdk.endpoints import Simulation
sim_id = '...' # <--- # Simulation ID for sim without OOB
sim: Simulation = api.simulations.get(sim_id)
assert sim.auto_oob_enabled is False
# Toggle ON OOB
sim.enable_auto_oob()
sim.auto_oob_enabled
True

Toggling Off Automatic OOB

from air_sdk.endpoints import Simulation
sim_id = '...' # <--- # Simulation ID for sim with OOB
sim: Simulation = api.simulations.get(sim_id)
assert sim.auto_oob_enabled is True
# Toggle OFF OOB
sim.disable_auto_oob()
sim.auto_oob_enabled
False