contrail_api_cli_extra.misc package¶
General purpose commands.
contrail_api_cli_extra.misc.check_bad_refs module¶
-
class
contrail_api_cli_extra.misc.check_bad_refs.
CheckBadRefs
(name)¶ Bases:
contrail_api_cli_extra.utils.CheckCommand
Check for broken references.
The command will read all objects from the cassandra DB then for each object check that references exists in the API.
References includes refs, back refs, children, parents.
To run the command:
contrail-api-cli check-bad-refs –cassandra-servers db:9160 [uuids…]
-
class
contrail_api_cli_extra.misc.check_bad_refs.
PropertiesEncoder
(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, encoding='utf-8', default=None)¶ Bases:
json.encoder.JSONEncoder
-
encode
(o)¶ Return a JSON string representation of a Python data structure.
>>> JSONEncoder().encode({"foo": ["bar", "baz"]}) '{"foo": ["bar", "baz"]}'
-
contrail_api_cli_extra.misc.dot module¶
-
class
contrail_api_cli_extra.misc.dot.
Dot
(name)¶ Bases:
contrail_api_cli.command.Command
Command to create a dot file from a list of paths.
The command will automatically add to the graph the parent, refs and back_refs of the given resources:
contrail-api-cli dot path/to/res1 path/to/res2 -f /tmp/output.dot
-e option can be used to exclude resources from the graph.
contrail_api_cli_extra.misc.graph module¶
contrail_api_cli_extra.misc.manage_rt module¶
-
class
contrail_api_cli_extra.misc.manage_rt.
ManageRT
(name)¶ Bases:
contrail_api_cli.command.Command
Command to manage VN custom RTs
contrail_api_cli_extra.misc.rpf module¶
-
class
contrail_api_cli_extra.misc.rpf.
RPF
(name)¶ Bases:
contrail_api_cli_extra.utils.PathCommand
Simple command to enable or disable RPF (Reverse Path Forwarding) on a VN.
To check if RPF is enabled or not run:
contrail-api-cli rpf virtual-network/uuid
To enable of disable RPF add
--on
or--off
options.
contrail_api_cli_extra.misc.vm module¶
-
class
contrail_api_cli_extra.misc.vm.
RescheduleVM
(name)¶ Bases:
contrail_api_cli_extra.utils.CheckCommand
Command to move a SI VMs from one virtual-router to other virtual-routers.
This command will move all SI VMs found on the provided VR to a list of VRs. The command will make sure two VMs of the same SI will not end up on the same VR.
The command can be run in dry-run mode to see how the VMs will be moved.
To reschedule VMs run:
contrail-api-cli reschedule-vm virtual-router/uuid1 virtual-router/uuid2 virtual-router/uuid3
This will move all VR/uuid1 SI VMs to VR/uuid2 and VR/uuid3 evenly.