Within networking_arista/ml2/arista_ml2.py, the register_with_eos()
method takes care to redact the keystone password by maintaining a copy
of "cmds" in "log_cmds".
cmds and log_cmds are then passed through _run_openstack_cmds() ->
_run_eos_cmds() -> _send_eapi_req(). However, _send_eapi_req() does not
have an argument for log_cmds, and ends up logging the password on line
1118.
Fix this by updating _send_eapi_req() to accept 'commands_to_log', and
subbing those into the msg to be logged.
Change-Id: I42a79f6e5f5352d982641ffc16215e1919355fda
Closes-Bug: #1634937
In the initialization of Arista ML2 mechanism driver, if registration with
EOS fails only log an error message and continue with the next step in the
initialization.
The registration will be performed in the sync method periodically.
A new flag is introduced which is an indication of availability of EOS to
Arista ML2 driver. In case of failure it is set to unavailable and when
registration succeeds it will be set to available.
Change-Id: I32218e2f2e3a97e66bf26a72a7da03cc4513d3ce
Closes-Bug: #1624501
Some of router functions (i.e. update, delete, etc) have been updated
to invoke ML2 fuctions which are executed in the session's context.
Arista L3 Plugin was invoking router base class funtions in context
as well. This now causes the problem because of upstream changes.
This patch removes those calls from the session's context.
Change-Id: Ifa859f3076f73528b36c6395001ff4b9f6958bce
The EAPI driver uses the cli_commands dict to see if certain features
are implemented on the EOS version it is talking to. Since no CLI
commands are issued in the JSON API this should be an implementation
detail only.
Change-Id: I4fef4f3ff05176995085ee098c978c0918d6a94d
Closes-Bug: #1630010
Fix an isssue where we were not correctly storing the local sync name on
a successful sync_start causing it not to be sent in subsequent calls.
Change-Id: I2bc32e14e55fabdb13be702291e68d50c53ea9c5
Closes-Bug: #1629950
Passwords are now obscured in log file as **** instead of the plaintext password.
Change-Id: I8ec36a199c27b8fa355944131134fdeb683559f2
Closes-Bug: #1629470
Currently if there are empty identity auth fields for Keystone we send None and the API returns an error as these fields are required. Now we convert None to the empty string, "".
Change-Id: I6d38d4c156c67385fe83059d2ab29ea9c60ef022
Closes-Bug: #1629405
Fix an issue where there was a typo and curent_sync_name instead of current_sync_name was used.
Change-Id: I91f0389edfc204cf2109cc077354f59a13590644
Closes-Bug: #1629112
With later releases of Arista EOS OpenStack can be configured either using eAPI
or a new JSON based API. This change allows the ML2 plugin to use the
capabilities of this new API. Unit tests for the new API calls have also been
included.
Change-Id: I6565157947dd88c279f3cbc97468cdf74231e175
Closes-Bug: #1591362
In some part in the code we import objects. In the Openstack style
guidelines they recommend to import only modules.
http://docs.openstack.org/developer/hacking/#imports
Change-Id: Id590e93be213cc6ebf3a384f45b81b1060dddd77
Many deprecations are triggered early (on imports, for example)
before the warnings are enabled by the WarningsFixture in the
base test class.
To make sure all DeprecationWarning messages are emitted we enable
them via the PYTHONWARNINGS environment variable.
Change-Id: I28c95750cfd1a52eaa282db983ca9f4d5f7ea43f
This patch adds Ironic support to Arista ML2 driver.
This patch also adds support for Security Groups for
baremetal instances
Change-Id: I7449f511d172678a77e1b5f087f1b182a78948c0
With this patch, VLANs required by the DVR ports are configured on the switch
interface connected to the compute node hosting the DVR instance.
Change-Id: Ia8d0b4d4e191efd539a4353481fc6c2f16c67934
Closes-Bug: #1579964
If a network has ports attached to it, do not delete the network
instead raise an exception so that user knows about this
condition.
Additionally, during initialization, when networks are deleted,
remove all the ports associated with the network.
Change-Id: Idb72305ac37dfe0c865fe09fbc5ab784d807906d
Closes-bug: #1573207
The Arista VLAN type driver allows a user to configure a VLAN
allocation pool on Arista CVX that will be used when allocating
VLANs to Neutron VLAN networks.
Change-Id: If4c4fb5c07d363a9fd37d23aa0d2a4fc4419f796
An upstream code was changed to get the tenant_id for router.
This patch fixes L3 plugin to match with the upstream fix
Change-Id: I20ba82d014cbe8fabae59cfeded53dd1f8af88f2
When we added support for shared networks, we introduced a bug that
can result in the arista ML2 driver reacting to a port-create for a
non-vlan network if the network is a shared network. With this
change the arista ML2 driver will only react to port creates for
shared networks if they are vlan networks.
Change-Id: I4babcb82bd3efd7d189f5a284916507be6f41a70
Closes-Bug: #1553058
Added missing 'r' to AristaServicePluginConfigError in a few places
in arista_l3_driver.py
Change-Id: I38b8db68fd7503ab565beb6cd2561d315618b569
Closes-Bug: #1552963
Add error handling to capture misconfiguration for the eapi_host parameter and
invalid responses from the remote server.
Change-Id: I375fc96eff9c583c9e898ed62a171dfcd16c43b7
Closes-Bug: 1552497
This patch enables creation of ports which are not attached to any
resources. These ports can later be attached and detached from the
resource.
Change-Id: Ic04bf5b8aad58a7fed63a9978b9b244fcf5e407f
If there is an error running a CLI command on CVX, the EAPI response contains
data for each command in the command list. This patch goes through all the
elements in the list to find an error.
Change-Id: I1a0a5a47cdeba517074b7ffbdac3e37d5782e9b5
This change modifies the Arista ML2 driver to remove the use of jsonrpclib and
use the requests library instead. An associated change now allows configuring
the timeout interval for the requests library.
Aditionally, we now attempt to check if the last known EOS master is still
available before executing an EOS command, allowing the driver to detect a
switchover and converge faster.
Change-Id: I5b58f23129dff8a299022dc5089ce7e43fc9a234
Closes-Bug:1524126
The alembic migration scripts create the base version of the database tables
used by the networking-arista package.
Change-Id: Icefc9b395a3c15f7bdfde7c83545d90e53185eea
Use the auth_uri to construct the Keystone URL in favor of the now deprecated auth fragments (auth_protocol, auth_host, auth_port).
Change-Id: Id85fea8aff5d2616fac964a99aa9846b5918bfed
Modify the driver to identify the EOS instance
that has currently been elected the leader and
communicate with it, instead of the first EOS
instance in the configuration.
The driver now expects a comma separated list
of addresses or host names for the eapi_host
parameter in the configuration.
Change-Id: Iff6e7f59d2f966f361fff9b7ee94a59a0d6370a1
This patch uses locks to ensure that multiple neutron servers do not trample
upon each other's data while synchronizing.
Change-Id: I11c9a9f79f6f3652ef2ca8160df8e05f8491bc18
If a network does not belong to any tenant (such as the HA router network),
instead of relying on the tenant_id in the plugin context, use a special tenant
id called 'INTERNAL-TENANT-ID' as the tenant_id in the pluin context can be
different during creation and deletion depending on the tenant performing the
operation.
Closes-Bug: 1494302
Change-Id: I139c8a4754fcf75f9549a0c2b67697ad311fa4c8
On neutron restart, the internal network created for HA router was cleaned up
as there was no tenant associated with that network. This patch ensures that
networks without tenant id are handled correctly.
Closes-Bug: 1494310
Change-Id: I0d9db9bc8fa48ac211fee5fde6aa3e2dc8455361
occured -> occurred
for arista_l3_driver.py
Also fixed following spelling typo in comments:
authentification -> authentication
genric -> generic
vaild -> valid
infromation -> information
Change-Id: Ic4b7c5a990a8de7576334a9715dd78ddba63a539
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
In create_port_precommit, the VM was only added to the Arista DB if
the port was associated to a network in the same tenant. But in the
case of a shared network, the port tenant and the network tenant can
be different, while the VM should still be added to the DB.
The same goes for removing resources in delete_port_postcommit.
This commit ensures the VM is added to the DB when connected to a
shared network, and that everything is cleaned-up when disconnected.
Change-Id: I295e6c87b460be4adb44e2275fa3008d3ce3eda7