Currently the search API accepts resource_type as an optional param
which is used to limit the scope of the search to a given type of
resource. This in turn searches the backend for all fields of all
objects.
For example, a search for LogicalSwitch resource_type may return
NSGroups which contain a membership criteria for LogicalSwitch.
In this case NSGroups are returned since the target_type field for
the NSGroup is set to LogicalSwitch.
In order to correctly return only objects of type LogicalSwitch, the
query must have resource_type:LogicalSwitch instead of LogicalSwitch.
Change-Id: I0418c0a758b28ec46b77a7adaf2dbc3addac6da3
This patch adds a new util method to the NsxLib class.
NsxLib will expose a search method to retrieve objects from
backend based on their tags and resource type. Tags argument
must be present in order to search.
Tags are supplied in the following form:
[{'scope': <scope_val>, 'tag': <tag_value>}, ...]
Change-Id: I304e9c44e55657e652b2a8236e85602c295cf22b
This patch adds IP POOL ID to the port
create/update for container ports using the
key_values parameter of context in the request body.
Change-Id: Id08c265df0c00744ecb75d07c255c1bc549c2bac
There were some directories excluded from the pep8 run, and many checks
were ignored.
This cleans the exclude list, and fixes the PEP8 issues.
Change-Id: Ib56d45443009349a42fecfc14a792fdaa6d88d67
Sometimes function under test makes multiple calls to the backend,
and being able to provide list of different responses would improve
test coverage.
Change-Id: I27a8cefe28287d25ed5411d44c6e2cc6f0a0701e
Adding support for IP pool create/delete/get actions,
and also allocate & release IPs from the pool
Change-Id: Ieac0aad2268cffa9d4fb5b521ebec268f2b408f3
For allowed address pairs to be functional on NSXv3 plugin, we
need to enforce both Spoof Guard and MAC Learning switching
profile. MAC Learning is used to learning the mac address and
spoof guard is used for switch security to ensure only added
allowed address pairs to be allowed on this port.
Moreover, during fix bug #1631540, we removed the parameter
"mac_change_allowed". After further discussion with NSX team,
it doesn't have negative effect to add it back. The value it can
bring is to support guest VM on ESX host to change MAC address (
the mac_address still needs to be in allowed address pairs) on the
interface.
(Cherry picked from: I2c725df74835165587170f6136c06494d1bfcf7b)
Closes-Bug: #1631539
Change-Id: I1bd8b8e78d955d0f5d2e5a846dfa25c0a7312e47
The NSX3Client did not get the nsx managers IPs, and they where missing
from error messages.
To fix this, and also better fix a similar problem with max_attempts,
the client init method may get another instance of the client, and copy
relevant information from it.
This option is used by the copy-constructor "new_client_for" without the
RestClient class being aware of arguments relevant only to the NSXClient.
Also adding a new test for a resource error message, to make sure it contains
the nsx_manager ip.
(Cherry picked from : I9e7e28eb5fd69ace44547d40cf8cd09e2457c5ed)
Change-Id: I5066ae12aadd286ff880c8545df99a567aeddbeb