Skip to content

Commit

Permalink
Merge branch 'master' into srl-cfg-w-exec
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Sep 13, 2021
2 parents 521b56c + dd122d0 commit f7bd5a1
Show file tree
Hide file tree
Showing 10 changed files with 137 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ In addition to native containerized NOSes, containerlab can launch traditional v
* [Cisco IOS XRv9k](https://containerlab.srlinux.dev/manual/kinds/vr-xrv9k/)
* [Cisco Nexus 9000v](https://containerlab.srlinux.dev/manual/kinds/vr-n9kv)
* [Cisco CSR 1000v](https://containerlab.srlinux.dev/manual/kinds/vr-csr)
* [Dell FTOS10v](https://containerlab.srlinux.dev/manual/kinds/vr-ftosv)
* [Arista vEOS](https://containerlab.srlinux.dev/manual/kinds/vr-veos)
* [Palo Alto PAN](https://containerlab.srlinux.dev/manual/kinds/vr-pan)

Expand Down
1 change: 1 addition & 0 deletions clab/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ var kinds = []string{
"ceos",
"crpd",
"sonic-vs",
"vr-ftosv",
"vr-n9kv",
"vr-sros",
"vr-vmx",
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ In addition to native containerized NOSes, containerlab can launch traditional v
* [Juniper vMX](manual/kinds/vr-vmx.md)
* [Cisco IOS XRv9k](manual/kinds/vr-xrv9k.md)
* [Cisco Nexus 9000v](manual/kinds/vr-n9kv.md)
* [Dell FTOS10v](manual/kinds/vr-ftosv.md)
* [Cisco CSR 1000v](manual/kinds/vr-csr.md)
* [Arista vEOS](manual/kinds/vr-veos.md)
* [Palo Alto PAN](manual/kinds/vr-pan.md)
Expand Down
43 changes: 43 additions & 0 deletions docs/manual/kinds/vr-ftosv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Dell FTOSv (OS10) / ftosv

Dell FTOSv (OS10) virtualized router/switch is identified with `vr-ftosv` kind in the [topology file](../topo-def-file.md). It is built using [vrnetlab](../vrnetlab.md) project and essentially is a Qemu VM packaged in a docker container format.

vr-ftosv nodes launched with containerlab comes up pre-provisioned with SSH and SNMP services enabled.

## Managing vr-ftosv nodes

!!!note
Containers with FTOS10v inside will take ~2-4min to fully boot.
You can monitor the progress with `docker logs -f <container-name>`.

Dell FTOS10v node launched with containerlab can be managed via the following interfaces:

=== "bash"
to connect to a `bash` shell of a running vr-ftosv container:
```bash
docker exec -it <container-name/id> bash
```
=== "CLI"
to connect to the Dell FTOSv CLI
```bash
ssh admin@<container-name/id>
```

!!!info
Default user credentials: `admin:admin`

## Interfaces mapping
vr-ftosv container can have different number of available interfaces which depends on platform used under FTOS10 virtualization .qcow2 disk and container image built using [vrnetlab](../vrnetlab.md) project. Interfaces uses the following mapping rules (in topology file):

* `eth0` - management interface connected to the containerlab management network
* `eth1` - first data interface, mapped to first data port of FTOS10v line card
* `eth2+` - second and subsequent data interface

When containerlab launches vr-ftosv node, it will assign IPv4/6 address to the `eth0` interface. These addresses can be used to reach management plane of the router.

Data interfaces `eth1+` needs to be configured with IP addressing manually using CLI/management protocols.


## Features and options
### Node configuration
vr-ftosv nodes come up with a basic configuration where only `admin` user and management interfaces such as SSH provisioned.
3 changes: 3 additions & 0 deletions docs/manual/vrnetlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ The images that work with containerlab will appear in the supported list gradual
| MikroTik RouterOS | [vr-ros](kinds/vr-ros.md) | | |
| Palo Alto PAN | [vr-pan](kinds/vr-pan.md) | | |
| Cisco Nexus 9000v | [vr-n9kv](kinds/vr-n9kv.md) | | |
| Dell FTOS10v | [vr-ftosv](kinds/vr-ftosv.md) | | |




### Connection modes
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ nav:
- vr-xrv - Cisco XRv: manual/kinds/vr-xrv.md
- vr-csr - Cisco CSR1000v: manual/kinds/vr-csr.md
- vr-n9kv - Cisco Nexus 9000v: manual/kinds/vr-n9kv.md
- vr-ftosv - Dell FTOS10v: manual/kinds/vr-ftosv.md
- vr-veos - Arista vEOS: manual/kinds/vr-veos.md
- vr-ros - MikroTik RouterOS: manual/kinds/vr-ros.md
- vr-pan - Palo Alto PAN: manual/kinds/vr-pan.md
Expand Down
1 change: 1 addition & 0 deletions nodes/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
_ "github.com/srl-labs/containerlab/nodes/vr_nxos"
_ "github.com/srl-labs/containerlab/nodes/vr_pan"
_ "github.com/srl-labs/containerlab/nodes/vr_n9kv"
_ "github.com/srl-labs/containerlab/nodes/vr_ftosv"
_ "github.com/srl-labs/containerlab/nodes/vr_ros"
_ "github.com/srl-labs/containerlab/nodes/vr_sros"
_ "github.com/srl-labs/containerlab/nodes/vr_veos"
Expand Down
2 changes: 2 additions & 0 deletions nodes/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const (
NodeKindVrCSR = "vr-csr"
NodeKindVrPAN = "vr-pan"
NodeKindVrN9KV = "vr-n9kv"
NodeKindVrFTOSV = "vr-ftosv"
NodeKindVrROS = "vr-ros"
NodeKindVrSROS = "vr-sros"
NodeKindVrVEOS = "vr-veos"
Expand Down Expand Up @@ -99,6 +100,7 @@ var DefaultCredentials = map[string][]string{
"srl": {"admin", "admin"},
"vr-pan": {"admin", "Admin@123"},
"vr-n9kv": {"admin", "admin"},
"vr-ftosv": {"admin", "admin"},
"vr-sros": {"admin", "admin"},
"vr-vmx": {"admin", "admin@123"},
"vr-xrv9k": {"clab", "clab@123"},
Expand Down
83 changes: 83 additions & 0 deletions nodes/vr_ftosv/vr-ftosv.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// Copyright 2020 Nokia
// Licensed under the BSD 3-Clause License.
// SPDX-License-Identifier: BSD-3-Clause

package vr_ftosv

import (
"context"
"fmt"

"github.com/srl-labs/containerlab/nodes"
"github.com/srl-labs/containerlab/runtime"
"github.com/srl-labs/containerlab/types"
"github.com/srl-labs/containerlab/utils"
)

func init() {
nodes.Register(nodes.NodeKindVrFTOSV, func() nodes.Node {
return new(vrFtosv)
})
}

type vrFtosv struct {
cfg *types.NodeConfig
mgmt *types.MgmtNet
runtime runtime.ContainerRuntime
}

func (s *vrFtosv) Init(cfg *types.NodeConfig, opts ...nodes.NodeOption) error {
s.cfg = cfg
for _, o := range opts {
o(s)
}
// env vars are used to set launch.py arguments in vrnetlab container
defEnv := map[string]string{
"CONNECTION_MODE": nodes.VrDefConnMode,
"USERNAME": "admin",
"PASSWORD": "admin",
"DOCKER_NET_V4_ADDR": s.mgmt.IPv4Subnet,
"DOCKER_NET_V6_ADDR": s.mgmt.IPv6Subnet,
}
s.cfg.Env = utils.MergeStringMaps(defEnv, s.cfg.Env)

if s.cfg.Env["CONNECTION_MODE"] == "macvtap" {
// mount dev dir to enable macvtap
s.cfg.Binds = append(s.cfg.Binds, "/dev:/dev")
}

s.cfg.Cmd = fmt.Sprintf("--username %s --password %s --hostname %s --connection-mode %s --trace",
s.cfg.Env["USERNAME"], s.cfg.Env["PASSWORD"], s.cfg.ShortName, s.cfg.Env["CONNECTION_MODE"])
return nil
}
func (s *vrFtosv) Config() *types.NodeConfig { return s.cfg }
func (s *vrFtosv) PreDeploy(_, _, _ string) error {
utils.CreateDirectory(s.cfg.LabDir, 0777)
return nil
}
func (s *vrFtosv) Deploy(ctx context.Context) error {
_, err := s.runtime.CreateContainer(ctx, s.cfg)
return err
}
func (*vrFtosv) PostDeploy(_ context.Context, _ map[string]nodes.Node) error {
return nil
}

func (s *vrFtosv) GetImages() map[string]string {
return map[string]string{
nodes.ImageKey: s.cfg.Image,
}
}

func (*vrFtosv) Destroy(_ context.Context) error { return nil }
func (s *vrFtosv) WithMgmtNet(mgmt *types.MgmtNet) { s.mgmt = mgmt }
func (s *vrFtosv) WithRuntime(r runtime.ContainerRuntime) { s.runtime = r }
func (s *vrFtosv) GetRuntime() runtime.ContainerRuntime { return s.runtime }

func (s *vrFtosv) Delete(ctx context.Context) error {
return s.runtime.DeleteContainer(ctx, s.Config().LongName)
}

func (*vrFtosv) SaveConfig(_ context.Context) error {
return nil
}
1 change: 1 addition & 0 deletions schemas/clab.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"vr-pan",
"vr-ros",
"vr-n9kv",
"vr-ftosv",
"linux",
"bridge",
"ovs-bridge",
Expand Down

0 comments on commit f7bd5a1

Please sign in to comment.