neutron/neutron/debug
Rodolfo Alonso Hernandez 4b3baeb15a Do not inherit from built-in "dict"
This is not recommended because some type methods are implemented not
in Python but in C [1][2] and should not be overridden. Subclassing
the built-in types directly, will yield non-obvious errors that are
hard to debug, and identify at first glance [3].

[1] http://www.kr41.net/2016/03-23-dont_inherit_python_builtin_dict_type.html
[2] https://treyhunner.com/2019/04/why-you-shouldnt-inherit-from-list-and-dict-in-python/
[3] https://medium.com/bynder-tech/using-collections-in-python-36129737b5a1

Closes-Bug: #1849980

Change-Id: I08c712ff1b093370cda2ce66b93e2a0709094fe1
2019-11-29 18:12:07 +00:00
..
README Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
__init__.py Empty files should not contain copyright or license 2014-10-20 00:50:32 +00:00
commands.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00
debug_agent.py Do not inherit from built-in "dict" 2019-11-29 18:12:07 +00:00
shell.py Remove deprecated 'external_network_bridge' option 2019-03-09 22:07:38 +00:00

README

Debug Helper Script for Neutron

- Configure
export NEUTRON_TEST_CONFIG_FILE=/etc/neutron/debug.ini
or
export NEUTRON_TEST_CONFIG_FILE=/etc/neutron/l3_agent.ini

you can also specify config file by --config-file option

- Usage
neutron-debug commands

probe-create <net-id>
  Create probe port - create port and interface, then plug it in.
  This commands returns a port id of a probe port. A probe port is a port which is used to test.
  The port id is probe id.
  We can have multiple probe probes in a network, in order to check connectivity between ports.

  neutron-debug probe-exec probe_id_1 'nc -l 192.168.100.3 22'
  neutron-debug probe-exec probe_id_2 'nc -vz 192.168.100.4 22'

  Note: You should use a user and a tenant who has permission to
   modify network and subnet if you want to probe. For example, you need to be admin user if you
   want to probe external network.

probe-delete <port-id>  Delete probe - delete port then uplug
probe-exec <port-id> 'command'    Exec commands on the namespace of the probe
`probe-exec <port-id>` 'interactive command' Exec interactive command (eg, ssh)

probe-list     List probes
probe-clear    Clear All probes

ping-all --id <network_id> --timeout 1 (optional)
         ping-all is all-in-one command to ping all fixed ip's in all network or a specified network.
         In the command probe is automatically created if needed.

neutron-debug extends the shell of neutronclient,  so you can use all the commands of neutron