Skip to content

Commit

Permalink
Update examples (#60)
Browse files Browse the repository at this point in the history
Signed-off-by: Atanas Dinov <[email protected]>
  • Loading branch information
atanasdinov authored Apr 3, 2024
1 parent d4e5f8a commit 3d48fd7
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ Please refer to the official nmstate docs for more extensive [examples](https://

```shell
$ ./nmc generate --config-dir desired-states --output-dir network-config
[2023-11-20T10:55:56Z INFO nmc::generate_conf] Generating config from "desired-states/node1.yaml"...
[2023-11-20T10:55:56Z INFO nmc::generate_conf] Generating config from "desired-states/node2.yaml"...
[2023-11-20T10:55:56Z INFO nmc::generate_conf] Generating config from "desired-states/node3.yaml"...
[2023-11-20T10:55:56Z INFO nmc] Successfully generated and stored network config
[2024-04-03T07:47:50Z INFO nmc::generate_conf] Generating config from "desired-states/node1.yaml"...
[2024-04-03T07:47:50Z INFO nmc::generate_conf] Generating config from "desired-states/node2.yaml"...
[2024-04-03T07:47:50Z INFO nmc::generate_conf] Generating config from "desired-states/node3.yaml"...
[2024-04-03T07:47:50Z INFO nmc] Successfully generated and stored network config
```

#### Examine results
Expand Down Expand Up @@ -126,14 +126,17 @@ This is necessary in order for NMC to identify which host it is running on when
interfaces:
- logical_name: eth0
mac_address: FE:C4:05:42:8B:AA
interface_type: ethernet
- hostname: node2
interfaces:
- logical_name: eth1
mac_address: FE:C4:05:42:8B:AB
interface_type: ethernet
- hostname: node3
interfaces:
- logical_name: eth4
mac_address: FE:C4:05:42:8B:AC
interface_type: ethernet
```
### Apply config
Expand All @@ -151,9 +154,9 @@ Simply copy the directory containing the results from `nmc generate` (`network-c

```shell
$ ./nmc apply --config-dir network-config/
[2023-11-20T11:05:36Z INFO nmc::apply_conf] Identified host: node2
[2023-11-20T11:05:36Z INFO nmc::apply_conf] Copying file... "network-config/node2/eth1.nmconnection"
[2023-11-20T11:05:36Z INFO nmc] Successfully applied config
[2024-04-03T07:50:55Z INFO nmc::apply_conf] Identified host: node2
[2024-04-03T07:50:55Z INFO nmc::apply_conf] Processing interface 'eth1'...
[2024-04-03T07:50:55Z INFO nmc] Successfully applied config
```

**NOTE:** Interface names during the installation of nodes might differ from the preconfigured logical ones.
Expand Down

0 comments on commit 3d48fd7

Please sign in to comment.