Contents

Vswitch.create

Background:

  • Given I run `phut -v` interactively

Scenario: Vswitch.create(dpid: ...)

@sudo

  • When I type "Vswitch.create(dpid: 0xabc)"
  • And sleep 5
  • Then a vswitch named "0xabc" should be running

Scenario: Vswitch.create(name: ..., dpid: ...)

@sudo

  • When I type "Vswitch.create(name: 'firewall', dpid: 0xabc)"
  • And sleep 5
  • Then a vswitch named "firewall" should be running

Scenario: Vswitch.create(name: ..., dpid: ..., tcp_port:)

@sudo

  • When I type "vswitch = Vswitch.create(name: 'firewall', dpid: 0xabc, tcp_port: 99999)"
  • And sleep 5
  • Then a vswitch named "firewall" should be running on port "99999"

Scenario: Vswitch.create twice and fail

@sudo

  • Given I type "Vswitch.create(name: 'firewall', dpid: 0xabc)"
  • When I type "Vswitch.create(dpid: 0xabc)"
  • Then the output should contain:
    text
    a Vswitch #<Vswitch name: "firewall", dpid: 0xabc, openflow_version: 1.0, tcp_port: 6653> already exists

Source: features/shell/vswitch.create.feature at commit babb3554, Phut (GPL license).