Wallaby Series Release Notes¶
2.10.2-7¶
Other Notes¶
Parent resource mapping was added to
EXT_PARENT_RESOURCE_MAPPINGinneutron_lib.services.constantsfor theqosplugin.
2.10.2¶
Bug Fixes¶
Enforce policy for “qos_policy_id” attribute of port, network and fip so only authorized users can set/unset it. For more info see bug LP#1957175.
2.9.1¶
Other Notes¶
Add the
neutron_lib.plugins.constants.PLACEMENT_REPORTconstant so that it can be used elsewhere related to theplacement_reportservice plugin.
2.9.0¶
New Features¶
Added API definition for
rbac-address-groupextension, which allows sharing address groups between tenants via the network RBAC mechanism.
Added VNIC types
accelerator-directandaccelerator-direct-physical. Represents a port that supports any kind of hardware acceleration and is provided by Cyborg (https://wiki.openstack.org/wiki/Cyborg). RFE: 1909100.
2.8.0¶
New Features¶
Add constants for RBAC sharing actions:
ACCESS_SHARED,ACCESS_EXTERNAL, and a new actionACCESS_READONLY.
New API definition:
port-device-profile. The new field added toportsAPI,device_profile, represents a Cyborg device profile and is a named set of user requirements for one or more accelerators.
2.7.0¶
New Features¶
Add new constant
BROADCAST_MACwhich has valueFF:FF:FF:FF:FF:FFand represents broadcast MAC address.
A new vnic type
vdpahas been added to allow requesting port that utilize a vhost-vdpa offload. vhost-vdpa is simpler to vhost-user or kernel vhost offload but utilizes the newly added vdpa bus introduced in the Linux 5.7 kernel. vdpa interface can be implemented in software or hardware, when implemented in hardware they provide equivalent performance to sr-iov or hardware offloaded ovs while have two main advantages over both sriov and hardware offloaded ovs. Unlike the alternatives vhost-vdpa enable live migration of instance transparently and provides a standard virtio-net interface to the guest avoiding the need to install vendor specific drivers in the guest.
2.6.0¶
New Features¶
Add an API extension
security-groups-remote-address-groupthat adds the new fieldremote_address_group_idin security group rules. This allows users to easily manage SG rules for aggregated IP address blocks.
Bump
PlacementAPIClient'smax supported microversion to1.28, as from that versionallocationsAPI handles generations in a general way.Add
list_allocations,update_allocationandupdate_qos_minbw_allocationmethods.
Add
source_ip_prefixanddestination_ip_prefixto Neutron metering label rules.
Deprecation Notes¶
The parameter “remote_ip_prefix” in metering label rules has been deprecated. Its name expresses the opposite of what does when used, and the lack of documentation confuses people. Moreover, an alternative method has been proposed and approved to enable operators to create metering rules using both source and destination IP addresses.
2.5.0¶
New Features¶
Add an API extension
address-groupsthat enables users to aggregate IP address blocks into an address group object which can be later referenced when creating other resources.
Add an API extension
security-groups-normalized-cidrthat adds new, read-only attributenormalized_cidrto the security group rules.
Add keyword
is_sort_keyto agents. Make the agent’s attribute can be used as a sort key for sorting list result.
Add
supported_extensionsmethod toMechanismDriver. This method provides an standard API to implement, per mechanism driver, a way to filter the supported extensions. By default, this method will return the same set of extensions passed.
New API definition:
port-numa-affinity-policy. The new field added toportsAPI,numa_affinity_policy, represents the NUMA affinity policy requested by this port during the virtual machine scheduling. Values: None, « required », « preferred », « legacy ».
The API extension
uplink-status-propagationhas changed the default value ofpropagate_uplink_statusfrom False to True. Now, when this extension is enabled, the VF link state will be set, by default, to « auto », following the PF link state. This change will affect only new ports; existing ports will keep their current value.
2.4.0¶
New Features¶
Add API extension
dns-integration-domain-keywords. This extension indicates if the server supports usage of keywords likeproject_id,project_name,user_idanduser_namein the network’s DNS domain name.
The abstract class LinuxInterfaceDriver is now defined in
neutron-lib.agent.linux.interface. It contains only the abstract methods and the class variables.
The
timecostdecorator is available inneutron_lib.utils.helpersnow. This permits functions to be decorated with functionality that will emit a debug log with the time it took to execute the function.
Bug Fixes¶
The DHCP port numbers for IPv4 were defined incorrectly in
neutron_lib.constants, they are now correct -68(client) and67(server).
2.2.0¶
New Features¶
Added API definition for
rbac-address-scopeextension, which allows sharing address scope between tenants via the network RBAC mechanism.
Added API definition for
rbac-subnetpoolextension, which allows sharing subnetpool between tenants via the network RBAC mechanism.
2.0.0¶
New Features¶
The
tag-ports-during-bulk-creationshim extension API definition has been added to enable the tagging of ports during bulk creation.
Upgrade Notes¶
Python 2.7 support has been dropped. The minimum version of Python now supported by neutron-lib is Python 3.6.
1.31.0¶
New Features¶
Add field
qos_port_network_policy_idto theportdefinition. This read only parameter contains the QoS policy of the network where the port is plugged.
Other Notes¶
Bump the microversion used by
PlacementAPIClientfrom1.20to1.23in order to have access to thecodeattribute of JSON error responses (Placement API changelog). Both1.20and1.23were released in theRockyversion of Placement therefore we expect no upgrade impact.
1.30.0¶
New Features¶
Add a new field
descriptionin floating ip portforwardings that can be used to help users to manage/find easily theirs rules.
The API defintion for the
stateful-security-groupextension is now available inneutron_lib.api.definitions.stateful_security_group.
Other Notes¶
Removes the definition of
interconnectionAPI extension for neutron-interconnection project. Neutron-interconnection project was removed from Neutron stadium due to lack of activity for long time so there is no need to keep the API definition in the official Neutron’s API definitions.
1.29.1¶
New Features¶
The
extraroute-atomicapi-def’s ACTION_MAP is changed so we add the new member actions (add_extraroutesandremove_extraroutes) while we also keep therouterextension’s member actions (add_router_interfaceandremove_router_interface).
1.29.0¶
New Features¶
Router API is modified through a regime API extension to neutron-lib that enforces the admin state of a router be DOWN (admin_state_up=False) prior to modifying the distributed attribute of the router.
A new API validation type
type:ethertypehas been added and validates ethertypes either as a valid two byte octet or as “IPv4” and “IPv6” based on the sg_filter_ethertypes configuration setting.
New API definition:
extraroute-atomic.
Bug Fixes¶
Fixes an issue in the
l3-conntrack-helperAPI definition. The validation for thehelperfield passed a string validation method instead of the maximum length of the string. This caused a TypeError when running under python3.
1.28.0¶
New Features¶
A new exception named
NetworkAddressScopeAffinityErrorhas been added in neutron_lib/exceptions/address_scope.py. This is to be raised by consumers when network / address scope affinity constraints are violated on subnet creation and subnet pool updates.
Added two new parameters in
portbindings.port.vif_details:connectivity: a string informing about the back-end connectivity level (l2, l3 or not specified).bound_drivers: a dictionary mapping the binding level to the driver name.
The
SqlFixtureandStaticSqlFixtureare now available inneutron_lib.fixtures.
The
subnet-dns-publish-fixed-ipAPI extension is added. It adds thedns_publish_fixed_ipattribute to subnets, indicating whether to publish DNS records for fixed IPs from this subnet in an external DNS service. For details see [bug 1784879].
Add
ETHERTYPE_RARPconstant which represents RARP protocol to support live-migration.
Bug Fixes¶
Static route validator should verify that routed CIDR isn’t a loopback. Loopback addresses should not be routable. Bug: 1834012
Other Notes¶
Parent resource mapping was added to
EXT_PARENT_RESOURCE_MAPPINGinneutron_lib.services.constantsfor thel3-conntrack-helperextension.
1.27.0¶
New Features¶
A new method
retrieve_valid_sort_keyswas added toneutron_lib.api.attributes. This method can help retrieve valid sort keys from a given resource attribute map.
The
l3-conntrack-helperAPI definition forRouteris introduced, which allows conntrack helper target rules to be set for aRouter.
Introduced
expose-l3-conntrack-helperAPI extension for exposingconntrack_helpersfield inRouterAPI response. This extension requires therouterandconntrack_helperservice plugins.
Other Notes¶
Since commit, an AssociationProxy proxy instance is an AssociationProxyInstance derivative object. In order to import versions SQLAlchemy>=1.3.x, we need to handle both implementations.
1.26.0¶
New Features¶
Introduce the ML2 type driver abstract methods
initialize_network_segment_range_supportandupdate_network_segment_range_allocationsfor the network segment range support when the extension is loaded.
The
WarningsFixtureis now available inneutron_lib.fixtureand its constructor accepts additional module’s to use with filterwarnings.
The
model_queryfunction is now available inneutron_lib.db.utils.
The
neutron.objects.common_typesmodule is now available inneutron_lib.objects.common_types.
The
get_random_EUIandget_random_ip_networkfunctions are now available inneutron_lib.tests.tools.
The
AuthenticIPNetworkandAuthenticEUIclasses are now available inneutron_lib.utils.net.
The
neutron.objects.logapi.events_typesmodule is now available asneutron_lib.objects.logapi.events_types.
The
neutron.services.logapi.common.constantsmodule is now available asneutron_lib.services.logapi.constants.
The
neutron.objects.extensions.standardattributesmodule is now available asneutron_lib.objects.extensions.standardattributes.
The function
provider_network_attribute_updates_supportedis now available inneutron_lib.plugins.ml2.api.MechanismDriver.
The
neutron_lib.db.standard_attrmodule is now available for use.
The
subnet-service-typesextension is now available inneutron_lib.api.definitions.subnet_service_types.
The
InvalidSubnetServiceTypeandInvalidInputSubnetServiceTypeexceptions are now available inneutron_lib.exceptions.
The validation type
list_of_subnet_service_typesis now available.
The
OpenFixtureclass is now available inneutron_lib.fixtures.
The
reset_random_seedfunction is now available inneutron_lib.tests.tools.
Other Notes¶
Add new
PORT_FORWARDING_FLOATINGIP_KEYconstant.
IPandHOPOPTkeywords were added toneutron_lib.constants.IP_PROTOCOL_MAP. This allows the use of these keywords to be used when creating security group rules to describe either all IP protocols (for IPv4), or Hop-by-Hop Options (for IPv6), instead of having to use the number zero (0) for this purpose.
Add
NoAuthClientfor placement.client to enable fullstack testing of placement reporting service plugin.
1.25.0¶
New Features¶
Add
NetworkSegmentRangeOverlapsexception to prevent overlapping network segment ranges on creation.
Adds API definition for
rbac-security-groupsextension, which allows sharing security groups between tenants via the network RBAC mechanism.
Adds new L3 exception
RouterNotFoundInRouterFactoryinneutron_lib.exceptions.l3.
Adds definition of
interconnectionAPI extension for neutron-interconnection project.
Adds
subnetpool-prefix-opsAPI definition to neutron-lib. This extension introduces API’s that provide explicit support for removing prefixes from a subnet pool and adding subnets to a subnet pool.
The remaining
neutron.common.constantsare now available inneutron_lib.constantswith the exception ofEXT_PARENT_RESOURCE_MAPPINGthat is now available inneutron_lib.services.constants.
The
neutron_lib.tests._toolsmodule is now public and namedtools.
The
sqlalchemytypesmodule is now available inneutron_lib.db.
The trunk service constants are now available in
neutron_lib.services.trunk.constants, but now have the constant name prefixed withTRUNK_.
neutron_lib.worker.BaseWorkerwill now set the process title on process start, if it is a new process. By default, the name will be « neutron-server », and the description will be the name of the worker class, followed by the original process title. Both fields are customizable via thenameanddescarguments toBaseWorker.start(), and the change can be disabled via theset_proctitleargument to the__init__function.neutron.confwill have a setting for disabling this functionality for all in-tree workers, but by default, all out of tree plugin workers will set their name at fork time. Available settings are “on” (described above, and the default), “off” (same as today), or “brief”, which settings the process name to just name and description. “brief” is probably most useful/simple for deployers, but “on” is the default in order to prevent as many script related breakages as possible.
Adds traffic control related constants:
Qdisc types:
htb,tbfandingress, used in Neutrontc_libQdisc ID: for
ingresstype, because this one is specific only for ingress traffic.Qdisc parents: for
rootandingresstypes.
Upgrade Notes¶
Any plugin which forks worker processes from neutron-server will have its proctitle set to « neutron-server » plus a classname in ps output. Any tool used for monitoring/maintenance that watches the process table should be modified to only look for the string
neutron-server. On the plus side, it will now be possible to distinguish which process belongs to which plugin, based on the new naming. Note that the original process string is still in the proctitle, so as long as the scripting is not looking for a perfect string match, it should continue to work.
Other Notes¶
Base class for upgrade checks used in checks in
neutron-status upgrade checktool is now available inneutron_lib.utils.upgrade_checksand can be reused by other projects.
Add the
neutron_lib.plugins.constants.NETWORK_SEGMENT_RANGEconstant so that it can be used elsewhere related to thenetwork_segment_rangeservice plugin.
For technical reasons the
floatingip-autodelete-internalextension no longer requires therouterextension.
New module
neutron_lib.policywas added. It contains constants:RULE_ADMIN_OR_OWNER,RULE_ADMIN_ONLY,RULE_ANY,RULE_ADVSVC,RULE_ADMIN_OR_NET_OWNER,RULE_ADMIN_OR_NET_OWNER_OR_ADVSVCandRULE_ADMIN_OR_PARENT_OWNER. It contains also helper functionspolicy_andandpolicy_or. Those constants and functions can be used in policy modules in Neutron related projects.
Module
neutron_lib.dbis now removed from db profiling projects so database calls done from this module will not be tracked in osprofiler results. All db calls which are tracked by osprofiler are comming from Neutron and this avoids having each call logged twice in osprofiler report.
1.24.0¶
New Features¶
New shim API extension:
floatingip-autodelete-internal.
New exception classes:
UnknownResourceProviderandAmbiguousResponsibilityForResourceProvider.
The
SUBPORTS,TRUNKandTRUNK_PLUGINconstants are now available inneutron_lib.callbacks.resourcesfor defining Trunk related callback resources.
1.23.0¶
New Features¶
Maximum rpc timeout is now configurable by
rpc_response_max_timeoutfrom Neutron config instead of being calculated as10 * rpc_response_timeoutvalue.
The
agent-resources-syncedextension introduces a new agent attribute namedresources_syncedthat tracks the success of the resource view synchronization to Placement.
Extend the ML2 type driver abstract methods
reserve_provider_segmentandallocate_tenant_segmentwithfiltersthat is used as search criteria for the segment allocation support when network-segment-range extension is loaded.
Bug Fixes¶
The oslo.db wrap_db_retry function now supports randomized time jitter in its retry algorithm. Add support for that feature, if the installed version of oslo.db supports it.
Other Notes¶
The
neutron_lib.api.definitions.network_segment_range.NETWORK_SEGMENT_RANGE_TYPE_LISTconstant was moved toneutron_lib.constantsand renamed toNETWORK_SEGMENT_RANGE_TYPESso that it can be used elsewhere.
This change removes the
ONBOARD_SUBNETS_SPECSattribute extension from the subnet onboard extension descriptor. This has been deemed to be an unnecessary attribute extension during implementation and has been removed. Because subnet onboard is not yet a completed Neutron feature, the API definition is being updated to reflect this.
1.22.0¶
New Features¶
Adds new traffic control exceptions
TcLibQdiscNeededArgumentsandTcLibQdiscTypeErrorinneutron-lib.exceptions.qos.
A new function named
validate_route_cidrwas introduced which is used to validate ifdestinationofroutesanddestinationofhost_routesis a network address of a destination subnet or an IP address of a destination.
Add API definition for the new
network-segment-rangeextension.
The following exceptions from
neutron.common.exceptionshave been rehomed into neutron-lib;PortBindingAlreadyActive,PortBindingAlreadyExists,PortBindingError,ProcessExecutionError,RouterQosBindingNotFound,RouterQosBindingError.
The private ORM event listener functions from
neutron.db.apiare now inneutron_lib.db.apiand are automatically loaded when importing any neutron-lib module.
Add
smart-nicVNIC type for Smart NIC ports.
1.21.0¶
New Features¶
Add
can_port_be_bound_to_virtual_bridgefunction inneutron_lib.plugins.utils. This function checks if a port, depending on the VNIC type, can be bound to a virtual bridge.
Add method
get_valuesinneutron_lib.db.model_query. This method allow callers to fetch specific column from a database model. Add keyword parameterfieldto methodquery_with_hooks. The default value of this parameter is None. Callers can set this parameter to query specific column.
The
get_updatable_fieldsfunction fromneutron.objects.baseis now available inneutron_lib.object.utils.
Bug Fixes¶
The
gateway,allocation_poolsandcidrattributes of a Subnet with IPv6 addresses are now converted to IPv6 canonical format to address. bug 1531103
Directly updating some L3-related port IP addresses does not have any effect on the L3 agent side. As a consequence, these L3-related ports should not allow changing of their IP address. A new shim extension has been added called
l3-port-ip-change-not-allowedto prevent such IP address change. For more information please see bug 1796824.
The
qos-rules-aliasAPI extension wrongly attempted to re-definebandwidth_limit_rules,dscp_marking_rulesandminimum_bandwidth_rulesas first level API resources, leading to conflicts in the QoS API. We now definealias_bandwidth_limit_rules,alias_dscp_marking_rulesandalias_minimum_bandwidth_rulesthat will enable users to performGET,PUTandDELETEoperations on the corresponding QoS rules without having to specify the associated policy ID.
Other Notes¶
The Placement client previously swallowed a few exceptions (but logged a warning when doing this). In order to let the user of the client choose to handle or ignore the error condition the client no longer does this. Also to avoid losing error information we catch and re-throw HTTP 4xx exceptions with better messages.
1.20.0¶
Prelude¶
This release adds support for custom filtering in versioned object.
New Features¶
The
qos-rules-aliasAPI extension is introduced to enable users to performGET,PUTandDELETEoperations onbandwidth_limit_rules,dscp_marking_rulesandminimum_bandwidth_rulesas though they are first level resources. In other words, the user will not have to specify the QoS policy ID.
The
neutron.db._resource_extendis now available asneutron_lib.db.resource_extendalong with a newDBResourceExtendFixturethat allows tests to modify the map of registered resource functions.
A class called
FilterObjis introduced. This is the base class from which the custom filter class should inherit. This release also implements two filter class:NotInandNotEqual. The classStringMatchingFilterObjis now a subclass ofFilterObj.
Bug Fixes¶
Bug 1796854 is fixed by validating if advsvc context is used.
Neutron API should not allow user to set zero for floating IP port forwarding internal or external port number. Directly modify the floating-ip-port-forwarding extension to change external_port and internal_port minimum value to 1. Then API and port forwarding object will make consistent for these attributes.
Change API to enforce policy rules for subnet entities with specified segment_ids, to fix a broken implementation of that policy enforcement. Bug: 1784259
1.19.0¶
New Features¶
The
project-default-networksextension is now available and adds a new attributeproject_defaultinto thenetworkresource. This attribute will be used to indicate if a network is a project default network.
Add new extension qos-gateway-ip which extends the router_gw_info with new attribute qos_policy_id.
Introduced
neutron_lib.utils.net.random_mac_generator(basemac). It allows you to get a mac address string Python generator from the same kind of basemac thatneutron_lib.utils.net.get_random_mac(basemac)expects. If there are a lot of macs to get, this will speed the process up significantly over generating single macs and testing for collisions.
New methods available in Placement client:
update_resource_providerandensure_resource_provider.
New constants module for Placement:
neutron_lib.placement.constants.
neutron-lib now has a new module:
neutron_lib.placement.utils. This module contains logic that is to be shared between in-tree Neutron components and possibly out-of-tree Neutron agents that want to support features involving the Placement service (for example guaranteed minimum bandwidth).
policy-in-code support in neutron-lib is added. The default policies for “context_is_admin” and “context_is_advsvc” are now implemented as embeded policies. (Note that the main policy-in-code support will be implemented in the main neutron codebase.)
The new extension
port-resource-requestadds theresource_requestattribute to port responses. This attribute enables Neutron to communicate to Nova resources needed by the port, such as physnet, VNIC type and bandwidth. If the port requested by Nova boot has theresource_requestattribute, then the Nova Scheduler will try to allocate the VM in a host that can satisfy those requirements.
New extension
qos-bw-minimum-ingressfor extendingqos_minimum_bandwidth_rulewith ingress direction for placement based enforcement.
New MechanismDriver API class property:
resource_provider_uuid5_namespace. Mechanism drivers wanting to support resource provider information reporting to Placement (eg. reporting resource providers to guarantee some minimum bandwidth allocated on them later) must set this class property to a UUID object unique to that mechanism driver. It will be used as a UUID v5 namespace in generating UUIDs for resource providers. The default implementation sets it toNone, meaning that the mechanism driver does not support resource provider information reporting to Placement. Unaffected drivers need not be changed.
New MechanismDriver API method:
responsible_for_ports_allocation. Mechanism drivers wanting to support resource allocations for ports in Placement (eg. wanting to guarantee some minimum bandwidth allocated on the resource provider in the port’sbinding:profile.allocation) must implement this method. The default implementation reports not being responsible for any resource providers, therefore unaffected drivers need not be changed.
Bug Fixes¶
Increase the DB retry interval and max retry times for the
retry_db_errorsdecorator inneutron_lib.db.apito 0.5 seconds and 20 times, respectively. For those actions which have a higher chance for DBDeadlock, users should have a higher success rate due to the larger random range and retry times. For more information see bug 1777968
Other Notes¶
Add two fields
columnsandvalueto exceptionNeutronDbObjectDuplicateEntry. These two fields are populated from the corresponding db exception.
Bump
PlacementAPIClient'smax supported microversion to1.20, as from that microversion placement API returns json body for POST /resource_providers.
The
PlacementAPIClientclass is moved fromneutron_lib.clients.placementtoneutron_lib.placement.clientin order to consolidate all Placement related logic under sub-packageneutron_lib.placement.
The
resource_provider_generationparameters of the following methods ofPlacementAPIClientare now optional:update_resource_provider_inventories,update_resource_provider_inventoryandupdate_resource_provider_traits. You may call the methods without this parameter or passNonewith the meaning to ignore resource provider generations. That is the client will (in quick succession) get the object and update it supplying the same generation.
The
create_resource_providerandassociate_aggregatesmethods ofPlacementAPIClientnow return the parsed body of the respective responses. Since these methods returnedNonepreviously this is unlikely to break anything. On the other hand callers of these methods now have a chance to simplify their code.
This release removes the
descriptionfrom the segment extension’s attribute map as well as adds thestandard-attr-descriptionas required dependency andstandard-attr-segmentas an optional dependency.
1.18.0¶
New Features¶
Add API extension
sort-key-validation. This extension indicates if the server supports validation on sorting.
Add API extension
filter-validation. This extension indicates if the server supports validation on filter parameters of the list requests.
Introduced
expose-port-forwarding-in-fipAPI extension for exposingport_forwardingsfield inFloatingIPAPI response. This extension requires therouterandport_forwardingservice plugins.
The
neutron.common.rpcmodule is now available asneutron_lib.rpcand automatically exposes all exception modules fromneutron_lib.exceptionsfor RPC usage.
Exceptions from
neutron.common.exceptionsare now available in theneutron_lib.exceptionspackage whereupon exceptions are now in their respective module (e.g. L3 exceptions are inneutron_lib.exceptions.l3, etc.).
The
neutron.tests.fake_notifieris now available asneutron_lib.tests.unit.fake_notifier.
The
neutron_lib.utils.runtime.list_package_modulesfunction is now available for listing all modules in a said package.
The
RPCFixtureis now available inneutron_lib.fixturesfor setting up RPC based unit tests.
The
get_port_binding_by_status_and_hostfunction is now available inneutron_lib.plugins.utils.
Adds api-extension
segments-peer-subnet-host-routes. Adds host routes to subnets on a routed network (segments). RFE: 1766380.
Other Notes¶
API extension
sort-key-validationrelies on theis_sort_keykeyword in theRESOURCE_ATTRIBUTE_MAPto judge if an attribute can be used as sort key. Neutron plugins which want to support sort key validation needs to setis_sort_keytoTruefor each attribute in their resource attribute map.
API extension
filter-validationrelies on theis_filterkeyword in theRESOURCE_ATTRIBUTE_MAPto judge if an attribute can be used as filter. Neutron plugins which want to support filter validation needs to setis_filtertoTruefor each attribute in their resource attribute map.
The
convert_list_toanddefaultparameters of external_fixed_ips have been removed from l3 and l3_ext_gw_mode API definitions.
1.17.0¶
New Features¶
Add
floatingip-poolsAPI extension. This extension provides API endpoint for listing floatingip pools.
Adds api extension
port-mac-address-regenerate. Also adds converterconvert_to_mac_if_noneused by api extenstionport-mac-address-regenerate. When passing'null'(None) as themac_addresson port update the converter will generate a new mac address that will be assigned to the port. RFE: #1768690.
The API defintion for the
port-security-groups-filteringextension is now available inneutron_lib.api.definitions.security_groups_port_filtering.
Upgrade Notes¶
The
COREandL3service type name constants have been removed fromneutron_lib.constants. These constants are duplicates of those inneutron_lib.plugin.constantsand consumers should use the latter.
Other Notes¶
Add a shim extension
availability_zone_filterto indicate ifavailability_zoneresource supports filter parameters.
1.16.0¶
New Features¶
Add an API extension
uplink-status-propagationto indicate if the server support propagating uplink status. This extension adds an attributepropagate_uplink_statusto port. This attribute can be implemented for VF port. If it is set toTrue, the VF link state can follow that of PF. The default isFalsewhich is the current behavior.
Other Notes¶
Add a shim extension
standard-attr-segmentto indicate if segment resource contains standard attributes.
1.15.0¶
New Features¶
Add
empty-string-filteringAPI extension. This extension indicates if the server supports filtering attributes with empty value.
New
PORT_BINDING,ACTIVATEandDEACTIVATEdefinitions have been added toneutron_lib.agent.topics, to enable plug-ins to notify agents when a port binding has been activated or de-activated.
The
portforwardingAPI definition forFloatingIP``is introduced, which allows a ``FloatingIP:Portto forward packets back to a VM’sInternal IP:Port.
Add the definitions for the
sfcandflowclassifierAPI extensions of the networking-sfc project.
Add a
convert_uppercase_ipconverter, convenient to easily accept for instanceIpv4,IPv4andipv4independently of the case of the first two letters.
And add a
convert_prefix_forced_caseconverter, to allow forcing the case of a string prefix
Add a
uuid_list_non_emptyvalidator, that will validate that the value is a non-empty list of UUIDs
Add API extensions to advertise the support of standard attributes with BGPVPN resources:
standard-attr-bgpvpn,standard-attr-bgpvpn-network-association,standard-attr-bgpvpn-router-associationandstandard-attr-bgpvpn-port-association.
Bug Fixes¶
For Infiniband support, Ironic needs to send the
client-idDHCP option as a number in order for IP address assignment to work. This is now supported in Neutron, and can be specified as option number 61 as defined in RFC 4776. For more information see bug 1770932
1.14.0¶
Prelude¶
Change create_inventory in placement client to update_resource_provider_inventories and update_inventory to update_resource_provider_inventory
New Features¶
Add a new keyword
is_filterto attribute maps. This keyword indicates that the attribute can be used for filtering result on list requests.
Add a new keyword
is_sort_keyto attribute maps. This keyword indicates that the attribute can be used as a sort key for sorting list result.
The
neutron_lib.utils.runtime.NamespacedPluginsclass is now available and wraps a stevedore namespace of plugins.
The
neutron_lib.objects.registrymodule is now available for loading neutron versioned object classes registered as entry points with theNEUTRON_OBJECT_NAMESPACEnamespace therein. This global registry can be used by consumers to access references to neutron versioned object classes and instances so there’s no need to importneutron.objects.
Add
fip-port-detailsAPI extension. This extension addport_detailsattribute to the Floating IP resource.
Introduced priority to callback subscription. An integer value can be associated with each callback so that callbacks can be executed in specified order for same resources and events. Every callback will have priority value by default. To execute callbacks in specified order, priorities should be defined explicitly, lower priority value would be executed first.
A new flag can be used in API definition:
default_overrides_none. When enabled, the default value for the attribute will be used, including if the attribute was explicitly defined asnull.
Added
list_resource_providersfunction to the Placement API client, which allows to retrieve a list of Resource Providers filtering by UUID or parent UUID. It requires at least version1.3of placement API for listing resource providers that are members of any of the list of aggregates provided. It requires at least version1.14of placement API for listing nested resource providers.
Added
get_resource_providerfunction to the Placement API client, which allows to retrieve an specific Resource Provider by its UUID.
Added
PlacementAPIVersionIncorrectexception class which can be raised when requested placement API version is incorect and doesn’t support requested API feature.
A new
dict_populate_defaultsflag can be used in API definition for a dictionary attribute, which will results in default values for the keys to be filled in. This can also be used on values of a dictionary attribute if they are dictionaries as well.
The public APIs from
neutron.db.apiare now available in theneutron_lib.db.apimodule.
The
CONTEXT_READERandCONTEXT_WRITERglobal database contexts are available inneutron_lib.db.apifor convenient access as decorators.
The
DBRetryErrorsFixtureandDBAPIContextManagerFixturetest fixtures are now available inneutron_lib.fixtureallowing consumers to patch out retry error values and the gobal context manager.
The public functions of
neutron.db._model_queryare now available inneutron_lib.db.model_querywith the same name. While these modules can be used, forward looking projects should start moving to versioned objects and after which point we can remove this module.
A new fixture named
DBQueryHooksFixtureis provided for testing purposes allowing consumers to patch-out the model_query filter hooks.
The
make_weak_refandresolve_reffunctions from neutron are now available inneutron_lib.utils.helpers.
The
TenantIdProjectIdFilterConflictexception is now available inneutron_lib.exceptions.
The
neutron.objects.utilsmodule is now available inneutron_lib.objects.utils.
The database utility functions
get_marker_obj,filter_non_model_columns,model_query_scope_is_projectandresource_fieldsare now available inneutron_lib.db.utils.
The
dhcp_agent_schedulerextension’s API defintion is now available inneutron_lib.api.definitions.dhcpagentschedulerand the corresponding exceptions inneutron_lib.exceptions.dhcpagentscheduler.
The
neutron.plugins.common.utils.get_deployment_physnet_mtufunction is now available inneutron_lib.plugins.utilswith the same name.
The
create_network,create_subnetandcreate_portfunctions fromneutron.plugins.common.utilsare now available inneutron_lib.plugins.utils.
The
qos-bw-limit-directionextension’s API definition is now available inneutron_lib.api.definitions.qos_bw_limit_direction.
The
unstable_testdecorator fromneutron.tests.baseis now available in neutron-lib inneutron_lib.utils.test.
Make
segment_idof subnet resource writable. Enables the possibility to migrate a non-routed network to a routed network.
Adds
neutron-vpnaasAPI definitions to neutron-lib, includingvpnaas,vpn-endpoint-groupsandvpn-flavors.
Migrate user facing exceptions into neutron-lib along with the API definitions.
A new validator for type
type:list_of_subnets_or_noneto validate data is a list of subnet dicts orNoneis added too.
Known Issues¶
Placement API has no POST method for creating resource provider inventories but instead has PUT to update the inventories of a resource provider.
Placement API has method to update the inventory for a given resource_provider.
Upgrade Notes¶
Consumers using the global
context_managerfromneutron.db.apishould now use theget_context_manager()function in theneutron_lib.db.apimodule or the globalCONTEXT_READERandCONTEXT_WRITERif needed.
The deprecated
neutron_libutils.file.ensure_dirfunction is removed. Consumers can useensure_tree(path, 0o755)fromoslo_utils.fileutilsinstead.
The
neutron_lib.api.utilsmodule has been removed. The singlepopulate_project_infofunction therein is available inneutron_lib.api.attributesand has been marked as a moved function in theutilsmodule for some time now.
Bug Fixes¶
Change the method name create_inventory in clients/placement.py to update_resource_provider_inventories as that represents what is on the placement side.
Change the POST call to /resource_providers/{uuid}/inventories to PUT.
Change the method name update_inventory in clients/placement.py to update_resource_provider_inventory as that represents that the method updates the inventory of a resource_provider.
Other Notes¶
The
LABELvariable, which was uselessly duplicatingALIAS, has been removed from API definition modules.
1.13.0¶
New Features¶
Add
ip-substring-filteringAPI extension. This extension provides the ability to filter ports with an IP address substring.
Updated fwaas API extension definition to include previously missing ability to specify remote firewall groups for ingress and egress traffic. When a firewall group rule specifies a remote group, for example an ingress rule in fwgA specifies a remote group of fwgB, that means only packets from fwgB could match this ingress rule.
This adds two new events
PRECOMMIT_ADD_ASSOCIATION,PRECOMMIT_DELETE_ASSOCIATIONSand a resourceROUTER_CONTROLLER.
Moving the leftover DVR related constants from
neutron.common.constants. The constantsL3_AGENT_MODE_DVR_NO_EXTERNALandDVR_SNAT_BOUNDare now available inneutron_lib.constants.
The publically consumed API’s from
neutron.plugins.common.utilsare now available inneutron_lib.plugins.utils.
The
NetworkVlanRangeErrorandPhysicalNetworkNameErrorexception classes are now available inneutron_lib.exceptions.
The
qos-rule-type-detailsextension’s API definition is now available inneutron_lib.api.definitions.qos_rule_type_details.
The
revision-if-matchextension’s API definition is now available inneutron_lib.api.definitions.revisionifmatch.
The
router-service-typeextension’s API definition is now available inneutron_lib.api.definitions.routerservicetype.
The
segmentextension’s API definition is now available inneutron_lib.api.definitions.segment.
The
SHAREDconstant is now available inneutron_lib.constants.
The
sortingextension’s API definition is now available inneutron_lib.api.definitions.sorting.
The public constants and
get_topic_namefunction fromneutron.common.topicsare now available inneutron_lib.agent.topics.
1.12.0¶
New Features¶
Adds the IP-in-IP protocol under the name
ipipto the list of protocols supported in security group rules.
A new
PORT_BINDINGresource definition has been added toneutron_lib.callbacks.resources, to enable the multiple port binding service plugin to notify the core plugin and other subscribers when create, update and delete operations are performed on a port binding.
A new abstract method
ha_state_changehas been added toL3AgentExtension.
The
multi-providerextension’s API definition is available inneutron_lib.api.defintions.multiprovidernet.
Exceptions for the
multi-providerextension can be found inneutron_lib.exceptions.multiprovidernet.
The validation type
type:network_segmentsis now available for API attribute validation.
The neutron placement API client is now available as
neutron_lib.clients.placement.
A new fixture for testing placement API calls has been added as
neutron_lib.fixtures.PlacementAPIClientFixture.
The
qos-defaultextension’s API definition is now available inneutron_lib.api.definitions.qos_default.
The
rbac-policycallback resource now available asneutron_lib.callbacks.resources.RBAC_POLICY.
The
service-typeextension’s API definition is now available inneutron_lib.api.definitions.servicetype.
The
vlan-transparentextension’s API definition is now available inneutron_lib.api.definitions.vlantransparent.
The
get_vlan_transparentfunction from thevlan-transparentextension is available inneutron_lib.api.definitions.vlantransparent.
The
subnet_onboardAPI definition now supports creating and updating subnets
All methods defined in
APIExtensionDescriptorare now class methods. This allows consumers to call them without a reference to an actual extension object instance.
Bug Fixes¶
Bug 1738371 is fixed by comparing min port and max port in port range specification as integers instead of strings, during port range validation.
The
get_extended_resourcesmethod of theAPIExtensionDescriptorwas updated to also include the underlying API definition’sSUB_RESOURCE_ATTRIBUTE_MAPin the returned dict. As a result, theupdate_attributes_mapmethod now also includes the sub-resources if noextension_attrs_mapis passed to it.
1.11.0¶
New Features¶
The
bgpvpn-vniAPI extension adds thevnioptional attribute tobgpvpnobjects to control the VXLAN VNI when VXLAN encapsulation is used.
The
flavorsAPI definition is now available inneutron_lib.api.definitions.flavors.
A new
type:service_plugin_typevalidator has been added that allows a service plugin to be validated at runtime by checking theneutron_lib.plugins.directory.
Exceptions related to the
flavorAPI have been added toneutron_lib.exceptions.flavorsexcept forInvalidFlavorServiceTypewhich is now a genericInvalidServiceTypeinneutron_lib.exceptions.
The
PROVISIONAL_IPV6_PD_PREFIXconstant is now available inneutron_lib.constants.
Bug Fixes¶
Fixes BGPVPN Interconnection API to not allow the definition of an empty string Route Target (allowing it was simply wrong and unintentional).
Bug 1720046 is fixed by reverting the logic of
neutron_lib.utils.net.get_random_macto its original behavior from commit If2539f94b5479f0d6afa64c973082cbe8c5309ac.
1.10.0¶
New Features¶
A new converter
convert_to_stringintoneutron_lib.api.converters. This method can convert an argument which is not None into string value.
The new
net-mtu-writableextension API definition has been added asneutron_lib.api.definitions.network_mtu_writable. The new extension indicates that the networkmtuattribute is writeable. Plugins supporting the new extension are expected to also supportnet-mtu.
API reference for
extended port bindingsextension forportresource.
The
allowed-address-pairsAPI definition is now available inneutron_lib.api.definitions.allowedaddresspairs.
The address pair validation is now available via the
type:allowed_address_pairsvalidation type.
Address pair API definition exceptions are available in
neutron_lib.exceptions.allowedaddresspairs.
The
availability_zoneextension’s API definition is now available inneutron_lib.api.definitions.availability_zone.
A new API validation type
type:availability_zone_hint_listhas been added and validates a list of availability zone hints.
Exceptions for the
availability_zoneare now available inneutron_lib.exceptions.availability_zone.
The constant
AZ_HINTS_DB_LENhas been added toneutron_lib.db.constants.
The API definition for neutron extension
default-subnetpoolsis now available inneutron_lib.api.definitions.default_subnetpools.
The API definition for the
dvrextension is now available inneutron_lib.api.defintions.dvr.
The two
MacAddressGenerationFailureexceptions are now available asHostMacAddressGenerationFailureandNetworkMacAddressGenerationFailurefor host and network MAC address generation errors respectively.
The
external-netAPI extension’s API definition is now available inneutron_lib.api.definitions.external_net.
External network related exceptions are now available in
neutron_lib.exceptions.external_net.
The API definition for the
extrarouteextension is now available inneutron_lib.api.defintions.extraroute.
Exceptions related to the
extrarouteextension are now available inneutron_lib.exceptions.extraroute.
The
ip_allocationextension’s API definition is now available inneutron_lib.api.definitions.ip_allocation.
The
l2_adjacencyextension’s API definition is now available inneutron_lib.api.definitions.l2_adjacency.
The API definition for the
ext-gw-modeextension is now available inneutron_lib.api.definitions.l3_ext_gw_mode.
The
l3-haextension’s API definition is now available inneutron_lib.api.definitions.l3_ext_ha_mode.
Exceptions related to the
l3-haextension are available inneutron_lib.api.exceptions.l3_ext_ha_mode.
The
l3-flavorsextension’s API definition is now available inneutron_lib.api.definitions.l3_flavors.
The
meteringextension’s API is now available inneutron_lib.api.definitions.metering.
Exceptions for the
meteringextension are available inneutron_lib.exceptions.metering.
The
ExtensionDriverclass inneutron_lib.plugins.ml2.apinow contains theextension_aliasesproperty to match neutron’s implementation.
The API definition for neutron’s
network_availability_zoneextension is now available inneutron_lib.api.definitions.network_availability_zone.
The
network-ip-availabilityextension’s API definition is now available inneutron_lib.api.definitions.network_ip_availability.
The
paginationAPI extension’s API definition is now available inneutron_lib.api.definitions.pagination.
The
project-idAPI extension’s API definition is now available inneutron_lib.api.definitions.project_id.
The API definition for neutron’s
qosextension is now available inneutron_lib.api.definitions.qos.
Neutron’s
router_availability_zoneextension API definition is now available inneutron_lib.api.definitions.router_availability_zone.
Adds
subnet_onboardAPI definition to neutron-lib.
1.9.1¶
New Features¶
The
FAULT_MAPdictionary fromneutron.api.v2.basehas been rehomed toneutron_lib.api.faultswith the same name.
1.9.0¶
New Features¶
A VIF type for Agilio OVS (
VIF_TYPE_AGILIO_OVS) has been added to portbindings. This links the external Neutron plugin to the external OS-VIF plugin in Nova.
The
VNIC_VIRTIO_FORWARDERVNIC type has been added to portbindings. This VNIC type is intended to request a low-latency virtio port inside the instance, likely backed by hardware acceleration. Currently the Agilio OVS external plugin provides support for this, with support from other vendors following soon.
The exception classes have migrated from neutron_fwaas to neutron_lib as mentioned below:
neutron_fwaas.extensions.firewall->neutron_lib.exceptions.firewall_v1neutron_fwaas.extensions.firewallrouterinsertion->neutron_lib.exceptions.firewall_v1neutron_fwaas.extensions.firewall_v2->neutron_lib.exceptions.firewall_v2
API definition for the logging extension for
security_groupresource.
The
net-mtuextension API definition has been added asneutron_lib.api.definitions.network_mtu.
Added validator
range_or_none.
The neutron
address-scopeextension’s API definition is now available asneutron_lib.api.definitions.address_scope.
The neutron
agentextension’s API definition is now available asneutron_lib.api.definitions.agent.
The neutron
auto-allocated-topologyextension’s API definition is now available asneutron_lib.api.definitions.auto_allocated_topology.
Contexts may now have transaction constraints set on them to be enforced by the revision plugin in Neutron for generalized compare-and-swap updates. Calling
set_transaction_constrainton the context before performing a resource mutation will setup the constraint. This is also exposed to users via the HTTP API withif-matchheaders and the API layer sets the constraint on the context.
Bug Fixes¶
Update hacking check
N536. Current implementation recognizesself.assertEqual((None, None), A)as invalid incorrectly while(None, None)is notNone.
1.8.0¶
New Features¶
A new
neutron_lib.validatorspackage is now available where the existing definitions from thevalidatorsmodule are now inneutron_lib.validators.__init__and subsequent per-component validators can be created in their own validators sub-module.
The
bgpvpn-routes-controlAPI extension is introduced to enrich the basebgpvpnextension. It allows to control BGPVPN connectivity at the granularity of a port and the advertisement into a BGPVPN of routes corresponding to destination reachable via a given port (static routes, BGPVPN route leaking).
The
DNS Integrationextension API definition has been added asneutron_lib.api.definitions.dns.
The
validate_dns_name,validate_fip_dns_name, andvalidate_dns_domainare now available as neutron-lib validators.
The
dns-domain-portsextension API definition has been added asneutron_lib.api.definitions.dns_domain_ports.
API reference for the logging extension for
security_groupresource.
Constants from
neutron.common.constantsare now available in neutron-lib. Note that consumers usingROUTER_STATUS_ACTIVEorROUTER_STATUS_ERRORshould now just useACTIVEandERRORfromneutron_lib.constants.
The public APIs from
neutron.plugins.ml2.driver_apiare now inneutron_lib.plugins.ml2.api.
The neutron versioned object exceptions from
neutron.objects.exceptionsare now available inneutron_lib.objects.exceptions.
The
DriverBaseclass fromneutron.services.qos.drivers.baseis now available in theneutron_lib.services.qos.basemodule.
The constants defined in
neutron.services.qos.qos_constsare now available inneutron_lib.services.qos.constants.
The
load_class_by_alias_or_classnamefunction fromneutron.common.utilsis now available inneutron_lib.utils.runtime.
The
synchronizeddecorator fromneutron.common.utilsis now available inneutron_lib.utils.runtime.
Other Notes¶
The deprecated
N523hacking check that ensures proper oslo namespace imports has been removed.
1.7.0¶
New Features¶
The constants
VALID_BLANK_EXTRA_DHCP_OPTSandDHCP_OPT_VALUE_MAX_LENare now public in theneutron_lib.api.definitions.extra_dhcp_optAPI definition module.
1.6.0¶
New Features¶
A bulk of the
neutron.api.v2.attributesfunctionality is now available inneutron_lib.api.attributes. A newAttributeInfoclass is available in that acts as a wrapper for an API resource’s attribute dict and allows consumers to perform operations with the underlying attribute dict. Thepopulate_project_infofunction is now available. The global attribute mapRESOURCESis now available and will take the place of neutron’s globalRESOURCE_ATTRIBUTE_MAP.
The
neutron_lib.fixture.APIDefinitionFixturehas been updated to handle backing-up and restoring the globalRESOURCESdict. By default the constructor now also uses all API definitions if none are passed to it’s constructor. This is the default behavior almost all consumers need and is thus a convenience change.
1.5.0¶
New Features¶
The
ACTION_STATUSis added to API definitions for neutron extension has specificaction_status.
A new converter is added to facilitate converting IPv6 CIDRs to canonical format. This way IPv6 CIDRs can be specified in multiple formats but would be handled in their canonical format.
New
N537hacking check is introduced that enforces no logging message translations, in any logging level. The check is enabled by default. Also, theN533hacking check is now removed because it is covered byN537.
The
network,port,subnetandsubnetpoolAPI definitions are now available inneutron_lib.api.definitions.
The
extra_dhcp_optAPI extension definition fromneutron.extensionshas been rehomed toneutron_lib.api.definitionswith the same name.
A new validator
validate_any_key_specs_or_nonehas been added for the corresponding validation typetype:list_of_any_key_specs_or_none. This validator can be used to check that a list of dicts match at least 1 key spec allowing consumers the ability to define multiple formats for their validated data.
The
neutron.common.utilsfunctionis_port_trustedis now available inneutron_lib.utils.net.
Upgrade Notes¶
FWaaS has renamed the
publicattribute tosharedto be in-sync with Openstack nomenclature based on the functionality thesharedattribute provides.
Library consumers may need to adopt their code to new requirements of
N537hacking check, removing translation markers from all logging messages. If for some reason it doesn’t fit the project, consumers can disable the new hacking check usingignorestatement inflake8section of theirtox.inifile, or by other means.
1.4.0¶
New Features¶
A new fixture for testing with neutron-lib API definitions has been added as
neutron_lib.fixtures.APIDefinitionFixture. This fixture can be used anytime extension plugins are being tested that modify resource attribute maps and ensures the single global API definition attribute map is copied and restored.
The
neutron_lib.api.extensions.APIExtensionDescriptorclass now defines update_attributes_map that uses the API definitions attribute map if none is given. This is the default behavior in most all extensions today and thus is collapsed into the base class for convenience.
Many of the constants from
neutron.plugins.common.constantsare now available inneutron_lib.plugins.constantsandneutron_lib.constants.
The
NeutronWorkerclass from theneutron.workermodule is now available asBaseWorkerinneutron_lib.worker.
Bug Fixes¶
The oslo.db context manager returned by
db.api.get_context_manager()will be configured with flush_on_subtransaction=True to more closely match the behavior of the previous session.begin(subtransactions=True) pattern we used everywhere before. See bug 1664643 for more details.
1.3.0¶
New Features¶
API reference for the
networking-bgpvpnextension.
The
APIExtensionDescriptorwas added toneutron_lib.api.extensionsand can be used with extensions that have an API definition in neutron-lib to minimize the boilplate code needed in the extension definition class. For more details, see the dev-ref.
API definition and reference documentation for the port data plane status extension.
The
neutron_lib.api.extensions.ExtensionDescriptorclass’sget_plugin_interfacemethod now formally only supportsneutron_lib.services.base.ServicePluginBase. This change reflects the existing usage by consumers as almost all are returning instances ofServicePluginBasealready.
The class
WorkerBaseis now available and provides the same functionality that’s provided byneutron.worker.WorkerSupportServiceMixin.
The ML2
MechanismDriverclass fromneutron.plugins.ml2.driver_apiis now available inneutron_lib.plugins.ml2.api.
The
port securityextension API definition has been rehomed fromneutrontoneutron_lib.api.definitions.port_security. The related exceptions can be found in theneutron_lib.exceptions.port_securitymodule.
Other Notes¶
The hacking check factory function
neutron_lib.hacking.checks.incubating_factoryhas been removed. All consumers should useneutron_lib.hacking.checks.factoryas per theusagedev-ref.
1.2.0¶
New Features¶
A new
neutron_lib.exceptionspackage is now available where the existing definitions from theexceptionsmodule are now inneutron_lib.exceptions.__init__and subsequent per-component exceptions can be created in their own exceptions sub-module.
Rehome the validation for checking if an extension is supported by the plugin. The method
is_extension_supportedwill now be part ofneutron_lib.api.extensions.
API definition for the
networking-bgpvpnextension.
Adds new validator
validate_list_of_regex_or_none.
neutron_lib.dbhas a public moduleapithat provides accessor functions for transactional context manager services.
neutron_lib.fixturehas a newSqlFixtureavailable.
API reference and definition for networking-midonet’s
fip64extension.
Added hacking check
N536. This hacking check is added to the incubating checks.
The exception classes from
neutron.extensions.l3have been rehomed intoneutron_lib.exceptions.l3.
API reference and definition for networking-midonet’s
logging-resourceextension.
API reference and definition for networking-midonet’s
router-interface-fipextension.
1.1.0¶
New Features¶
Introduced neutron_lib.plugins.directory.is_loaded(). This can be used in lieu of len(plugins()) or bool(plugins()) or plugins() alone.
Neutron agent extension abstract classes are moved from
neutron.agenttoneutron_lib.agent
The constants
EXPAND_BRANCHandCONTRACT_BRANCHare now available inneutron_lib.db.constants. They should be used instead of the ones inneutron.db.migration.cli.
The
contextmodule has been made public. For example:from neutron_lib import context ctx = context.get_admin_context()
For more examples, see: https://review.opendev.org/#/c/388157/
Introduced neutron_lib.fixture, and added fixture for plugin directory
PluginDirectoryFixture. An example below:from neutron_lib.plugins import directory from neutron_lib import fixture def setup_test_directory_instance(self): """Give a private copy of the directory to each test.""" self._plugin_directory = directory._PluginDirectory() self.useFixture(fixture.PluginDirectoryFixture( plugin_directory=self._plugin_directory))
Neutron’s callback API found in
neutron.callbacks.*is now exposed inneutron_lib.callbacks.*. In addition, a set of event payload objects are now available for use in transporting event payload data in a standardized way.
A test fixture is provided for isolating the global callback manager in
neutron_lib.callbacks.registry. For more details see the comments inneutron_lib.fixture.CallbackRegistryFixture.
Adds neutron-fwaas API definitions to neutron-lib.
Added the converter
convert_string_to_case_insensitive.
Added the converter
convert_to_protocol.
Added the validator
validate_port_range_or_none.
A converter
convert_ip_to_canonical_formathas been added to neutron-lib which allows IPv6 addresses to be stored and displayed in canonical format.
The
floating_ipandrouterAPI definitions fromneutron.extensions.l3have been rehomed toneutron_lib.api.definitionsas the modulel3.
The
get_random_macutility function fromneutron.common.utilsis now inneutron_lib.utils.netwith the same name,get_random_mac.
The API definition and associated constants have been rehomed from
neutron.extensions.portbindingstoneutron_lib.api.definitions.portbindings.
The Neutron
Provider networkextension API definition has been added asneutron_lib.api.definitions.provider_net.
The hacking check factory
incubating_factoryhas been added toneutron_lib.hacking.checksallowing adopters to test compliance on incubating hacking checks. See the usage documentation for additional details.
The class
neutron.services.service_base.ServicePluginBaseis now available asneutron_lib.services.base.ServicePluginBase.
Added validator validate_ip_or_subnet_or_none
Deprecation Notes¶
The function
neutron_lib.api.utils.populate_project_infohas moved toneutron_lib.api.attributes.populate_project_info. It will be removed from the old location in the future.
The use of
neutron_lib.callbacks.registry.notify()andneutron_lib.callbacks.manager.CallbacksManager.notify()is deprecated in favor of theirpublish()counterparts and will be removed in the « Queens » release time-frame.
policy.refresh()andpolicy.reset()have been removed. The library policy module is not meant for public consumption, and it should be considered in practice a private component of the library. If you use it, you will do so at your own risk, as it has been marked as a private module.
Other Notes¶
OpenStack dev hacking check
H904is now enabled intox.inivia theenable-extensionsconfiguration property. Neutron-lib adopters should also enable this hacking check in theirtox.ini.
1.0.0¶
New Features¶
The ExtensionDescriptor class moved from neutron.api.extensions to neutron_lib.api.extensions.
Introduced neutron_lib.plugins.directory to get references for loaded plugins in a neutron server process. For example:
from neutron_lib import constants from neutron_lib.plugins import directory core_plugin = directory.get_plugin() l3_plugin = directory.get_plugin(constants.L3)
For more examples, see: https://review.opendev.org/#/c/386845/
API reference for the trunk extension.
Other Notes¶
Provide API definition framework for Neutron Stadium APIs to be consolidated into neutron-lib. For more details see review https://review.opendev.org/#/c/353131/.