Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
- "27*.robot"
- "28*.robot"
- "29*.robot"
- "30*.robot"

# allow podman job to fail, since it started to fail on github actions
continue-on-error: ${{ inputs.runtime == 'podman' }}
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ This short clip briefly demonstrates containerlab features and explains its purp
Although being kick-started by Nokia engineers, containerlab doesn't take sides and supports NOSes from other vendors and opensource projects.
* **Lab orchestration**
Starting the containers and interconnecting them alone is already good, but containerlab packages even more features like managing lab lifecycle: [deploy](https://containerlab.dev/cmd/deploy), [destroy](https://containerlab.dev/cmd/destroy), [save](https://containerlab.dev/cmd/save), [inspect](https://containerlab.dev/cmd/inspect), [graph](https://containerlab.dev/cmd/graph) operations.
* **Systemd-capable container runtime controls**
Container nodes can opt into init-friendly runtime settings such as cgroup namespace mode, PID namespace mode, tmpfs mounts, security options, shared memory sizing, and privileged mode. Docker and Podman runtimes honor these settings consistently for containers that need to run systemd or other PID 1 supervisors.
* **Scaled labs generator**
With [`generate`](https://containerlab.dev/cmd/generate) capabilities of containerlab it possible to define/launch CLOS-based topologies of arbitrary scale. Just say how many tiers you need and how big each tier is, the rest will be done in a split second.
* **Simplicity and convenience**
Expand Down
2 changes: 1 addition & 1 deletion cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func deployFn(cobraCmd *cobra.Command, o *Options) error {

clabcore.ExportRenderedTopology = o.Deploy.ExportRenderedTopology

c, err := clabcore.NewContainerLab(o.ToClabOptions()...)
c, err := clabcore.NewContainerLab(o.ToClabDeployOptions()...)
if err != nil {
return err
}
Expand Down
11 changes: 11 additions & 0 deletions cmd/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,17 @@ func (o *Options) ToClabOptions() []clabcore.ClabOption {
return clabOptions
}

// ToClabDeployOptions defers node filtering until Deploy knows whether it is
// creating a new lab or reconciling an existing one.
func (o *Options) ToClabDeployOptions() []clabcore.ClabOption {
var options []clabcore.ClabOption
options = append(options, o.Global.toClabOptions()...)
options = append(options, o.Deploy.toClabOptions()...)
options = append(options, o.Destroy.toClabOptions()...)
options = append(options, clabcore.WithDeployNodeFilter(o.Filter.NodeFilter))
return options
}

func (o *Options) ToClabDestroyOptions() []clabcore.DestroyOption {
destroyOptions := []clabcore.DestroyOption{
clabcore.WithDestroyMaxWorkers(o.Deploy.MaxWorkers),
Expand Down
Loading