Skip to content

Commit

Permalink
DOC: Adding information on how to create a new node
Browse files Browse the repository at this point in the history
  • Loading branch information
sameurenvidia committed Nov 14, 2024
1 parent d8da52b commit c4e2258
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions content/nvidia-air/Air-SDK-V2.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,19 @@ sim.full_update(

`Node` and `Interface` objects have similar `.update` and `.full_update` methods for modifying their data.

#### Adding new nodes to a simulation
```python
>>> image = next(air.images.list(name='generic/ubuntu2204')) # Obtain an image for the node
>>> image
Image(name='generic/ubuntu2204', version='22.04', organization_name=None)
>>> new_node = air.nodes.create(simulation=sim, name='node13', os=image)
>>> new_node.os.id == image.id
True
>>> new_node.simulation.id == sim.id
True
```


## Exporting Simulations
Existing simulations can be [exported](https://air.nvidia.com/api/#/v2/v2_simulations_export_retrieve) into a JSON representation which can be shared and [re-imported](#file-import) into AIR.
```python
Expand Down

0 comments on commit c4e2258

Please sign in to comment.