Skip to main content

switches

This command retrieves inventory data about all managed Flex System and RackSwitch switches, all Flex System switches in a specific chassis, or a specific Flex System or RackSwitch switch.

Syntax

switches  -h

switches [-u <switch_UUID>] [-c <chassis_UUID>] [-v <filter>]

switches [-u <switch_UUID>] --ports <port_name> [--action <action>]

Options

{-h | --help}
Displays the syntax and brief usage information for this command.
{--action} <action>
Specifies the action to take on the specified port. This can be one or none of the following values:
  • enable. Enable the specified port.

  • disable. Disable the specified port

If no action is specified, this command displays port information for the specified switch.

{-c | --chassis} <chassis_UUID>
Specifies the UUID of a managed chassis. This command returns inventory data for all Flex System switches in the chassis.
{--ports} <port_name>
Specifies the ports to be modified. To obtain the port name, use this command without the —ports option to display information about the specified switch..
{-u | --uuid} <switch_UUID>
Specifies the UUID of a switch. If a UUID is not specified, this command returns inventory data for all managed switches unless you also specify the -s unmanaged option.
{-v | --view} <filter>
Identifies the view to use for the returned data. If a filter is not specified, the default view is used.

You can also create custom views (see Creating custom views).

Examples

The following example returns inventory data for all Flex System switches in the specified chassis.

connect --url https://192.0.2.0 --user ADMIN --noverify
switches -c AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

The following example enables a port on the specified switch..

connect --url https://192.0.2.0 --user ADMIN --noverify
switches -u AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA --ports Ethernet1/1 --action enable