get_token() method has argument 'refresh_token' in its signature.
Update get_token() method call when passing 'refresh_token' argument.
Change-Id: Idbf64f7f1f0db1c9bfbd079f426cfa3f79bd2edf
Set initial state when a new logical port is created. 'UNBLOCKED_VLAN'
means new port will be unblocked on traffic in creation, also VLAN will
be set with corresponding logical switch setting. This port setting
can only be configured at port creation, and cannot be modified.
VIF_RESTORE indicates proton to fetch and restore VIF attachment from
ESX host
Change-Id: I84c62ec15934fa2cb0f1f8dc8788ea12f43a403d
We will reuse the deprecated ls_id attribute to specify LogicalSwitch ID
when creating segment. The ls_id field will remain deprecated for the
general purpose.
Change-Id: Ie4d1186ac455b752efde9e2aff2e92ddfa24b570
In a multi cluster setup, an adaptive API rate limit is more useful as
utilization can be dynamically balanced across all active clusters.
AIMD from TCP congestion control is a simple but effective algorithm
that fits our need here, as:
- API rate is similar to TCP window size. Each API call sent
concurrently is similar to packets in the fly.
- Each successful API call that was blocked before sent will cause rate
limit to be increased by 1. Similar to each ACK received.
- Each failed API call due to Server Busy (429/503) will cause rate
limit to be decreased by half. Similar to packet loss.
When adaptive rate is set to AIMD, a custom hard limit can still be set,
max at 100/s. TCP slow start is not implemented as the upperbound of
rate is relativly small. API rate will be adjusted per period. API
rate under no circumstances will exceed the hard limit.
Change-Id: I7360f422c704d63adf59895b893dcdbef05cfd23
In some cases the full name is unknown but a significant suffix is know
and can be used to identify the correct rule.
Change-Id: Id1ce82e0dd4c91f56f83c1976e3ce3e528d685da
The default return value of maximum page size is 1000
according to MP container inventory configuration,
we need to concatenate the responses by using url_list
instead of url_get.
Change-Id: I41c8129988f79fda0cdf44dcf73af304d84ec61f
DistributedLoadBalancer VirtualServer doesn't support
setting lb_persistence_profile_path as empty string
to remove it. Instead, use non-partial-patch with existing
attributes and omit lb_persistence_profile_path to achieve removal.
Change-Id: Ia9612d076a1e2ccab1d2fa758006a74703c4d061
Now that we are python3 only, we should move to using the built
in version of mock that supports all of our testing needs and
remove the dependency on the "mock" package.
Also see commit: Ifcaf1c21bea0ec3c35278e49cecc90a101a82113
Change-Id: I11dc8a80471be347f89a30f59c1cc14cdb879726
JWT token used to authenticate with NSX can become invalid before
expiration due to VC service account credentials refresh. When this
case happens nsxlib should immediately re-get-token using the latest
creds and refresh request headers.
Change-Id: I1e3415379926f07e7b30eeaf44e9bcc7e2a26e9e
When endpoint goes down, the user should see same exception as
when the cluster is already down (detected by earlier activity).
For this purpose, translate grounding exception to
ServiceClusterUnavaliable.
In addition, display a warning if amount of retries is less than
amount of endpoints, since in this case not all endpoints will be
probed.
Change-Id: Ib4aa5eb95069b917c989b1f6dcd3535880b5a038
The user will be able to specify exception config object, that
defines which exceptions bring endpoint down, and which exceptions
trigger retry.
This change removes exception handling from the client class, which
hopefully makes the code more readable and easier to follow.
Change-Id: If4dd5c01e4bc83c9704347c2c7c8638c5ac1d72c
Currently in nsxlib, there's no client side API rate throttling. In a
scale setup it is deemed to easily overwhelm NSX backend. This patch
introduces a per-endpoint rate limiter that blocks over-limit calls.
Change-Id: Iccd1d2675bed16833d36fa40cc2ef56cf3464652
Before this change, keepalive probe consisted of two separate
configurable roundrip - one based on keepalive_section attribute,
and one on validation_method.
The recommended way to probe NSX appliance is using node/health API,
and tests show that it has best roundtrip time. This nsxlib will
switch to this healthcheck, and not expose keepalive methology to
clients any longer.
Change-Id: Ia972ef3d087fd01fa18d5a4e9dc9c32fbed0eb40