diff -Nru python-neutron-lib-2.18.1/api-ref/source/conf.py python-neutron-lib-2.20.0/api-ref/source/conf.py --- python-neutron-lib-2.18.1/api-ref/source/conf.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/conf.py 2022-02-17 10:28:33.000000000 +0000 @@ -58,8 +58,8 @@ master_doc = 'index' # General information about the project. -project = u'Networking API Reference' -copyright = u'2010-present, OpenStack Foundation' +project = 'Networking API Reference' +copyright = '2010-present, OpenStack Foundation' # openstackdocstheme options openstackdocs_repo_name = 'openstack/neutron-lib' @@ -189,8 +189,8 @@ # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ - ('index', 'Neutron.tex', u'OpenStack Networking API Documentation', - u'OpenStack Foundation', 'manual'), + ('index', 'Neutron.tex', 'OpenStack Networking API Documentation', + 'OpenStack Foundation', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/index.rst python-neutron-lib-2.20.0/api-ref/source/v2/index.rst --- python-neutron-lib-2.18.1/api-ref/source/v2/index.rst 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/index.rst 2022-02-17 10:28:33.000000000 +0000 @@ -31,6 +31,7 @@ .. include:: floatingippools.inc .. include:: fip-port-forwarding.inc .. include:: routers.inc +.. include:: router-ndp-proxy.inc .. include:: subnetpools.inc .. include:: subnetpool_prefix_ops.inc .. include:: subnets.inc @@ -112,3 +113,7 @@ Auto Allocated Topology ####################### .. include:: auto-topology.inc +################# +Tap as a Service +################# +.. include:: taas.inc diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/parameters.yaml python-neutron-lib-2.20.0/api-ref/source/v2/parameters.yaml --- python-neutron-lib-2.18.1/api-ref/source/v2/parameters.yaml 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/parameters.yaml 2022-02-17 10:28:33.000000000 +0000 @@ -205,6 +205,12 @@ in: path required: true type: string +ndp_proxy_id-path: + description: | + The ID of the ndp proxy. + in: path + required: true + type: string network_id-path: description: | The ID of the network. @@ -490,6 +496,18 @@ in: query required: false type: string +description_taf-query: + description: | + Filter the list result by the human-readable description of the resource. + in: query + required: false + type: string +description_tas-query: + description: | + Filter the list result by the human-readable description of the resource. + in: query + required: false + type: string device_id-query: description: | Filter the port list result by the ID of the device that uses this port. @@ -512,6 +530,12 @@ in: query required: false type: string +direction_taf-query: + description: | + Direction of the Tap flow. Possible options are: IN, OUT, BOTH + in: query + required: false + type: string dscp_mark-query: description: | Filter the list result by the DSCP mark value. @@ -945,6 +969,12 @@ in: query required: false type: integer +mirror_port_tas-query: + description: | + Port to which the Tap service is connected. + in: query + requried: true + type: string mtu-query: description: | Filter the network list result by the maximum transmission unit (MTU) @@ -959,6 +989,39 @@ in: query required: false type: string +ndp_proxy-ip-address-query: + description: + The IPv6 address which the ``ndp proxy`` annunciate to external network. + in: query + required: false + type: string +ndp_proxy-port-id-query: + description: + The ID of the port for the ndp proxy. + in: query + required: false + type: string +ndp_proxy-router-id-query: + description: + The ID of the router for the ndp proxy. + in: query + required: false + type: string +ndp_proxy-sort_key: + description: | + Sorts by a ndp proxy attribute. You can specify multiple pairs of sort key + and sort direction query parameters. The sort keys are limited to: + + - ``id`` + - ``name`` + - ``tenant_id`` + - ``project_id`` + - ``router_id`` + - ``port_id`` + - ``ip_address`` + in: query + required: false + type: string network-name-query: description: | Filter the list result by the human-readable name of the network. @@ -1141,6 +1204,13 @@ in: query required: false type: integer +project-domain_taas: + description: | + Domain the project belongs to (name or ID). + This can be used in case collisions between project names exist. + in: query + requried: false + type: string project_id-query: description: | Filter the list result by the ID of the project that owns the resource. @@ -1468,6 +1538,12 @@ in: query required: false type: string +source_port_taf-query: + description: | + Source port to which the Tap Flow is connected. + in: query + requried: true + type: string state-query: description: | Filter the list result by the state of the availability zone, which is @@ -1475,6 +1551,18 @@ in: query required: false type: string +status_taf-query: + description: | + Human-readable description of the status for tap flow. + in: query + required: false + type: string +status_tas-query: + description: | + Human-readable description of the status for tap service. + in: query + required: false + type: string subnet-dns_publish_fixed_ip-query: description: | Filter the subnet list result based on if ``dns_publish_fixed_ip`` is @@ -1587,6 +1675,18 @@ in: query required: false type: boolean +taf_id-query: + description: | + The ID of the Tap flow. + in: query + required: false + type: string +taf_name-query: + description: | + The name of the Tap flow. + in: query + required: true + type: string tags-any-query: description: | A list of tags to filter the list result by. @@ -1603,6 +1703,12 @@ in: query required: false type: string +tap_service_id-query: + description: | + Tap Service to which the Tap Flow belongs. + in: query + required: false + type: string target_tenant-query: description: | Filter the RBAC policy list result by the ID of the tenant to which the @@ -1610,6 +1716,18 @@ in: query required: false type: string +tas_id-query: + description: | + The ID of the Tap Service. + in: query + required: false + type: string +tas_name-query: + description: | + The name of the Tap Service. + in: query + required: true + type: string topic-query: description: | Filter the list result by the name of AMQP topic the agent is listening on @@ -1651,6 +1769,12 @@ in: query required: false type: boolean +vlan-filter_taf-query: + description: | + VLAN Ids to be mirrored in the form of range string. + in: query + required: false + type: string vlan_transparent-query: description: | Filter the network list by the VLAN transparency mode of the network, @@ -2569,7 +2693,8 @@ The type of vNIC which this port should be attached to. This is used to determine which mechanism driver(s) to be used to bind the port. The valid values are ``normal``, ``macvtap``, ``direct``, ``baremetal``, - ``direct-physical``, ``virtio-forwarder`` and ``smart-nic``. + ``direct-physical``, ``virtio-forwarder``, ``smart-nic`` + and ``remote-managed``. What type of vNIC is actually available depends on deployments. in: body required: true @@ -2579,7 +2704,8 @@ The type of vNIC which this port should be attached to. This is used to determine which mechanism driver(s) to be used to bind the port. The valid values are ``normal``, ``macvtap``, ``direct``, ``baremetal``, - ``direct-physical``, ``virtio-forwarder`` and ``smart-nic``. + ``direct-physical``, ``virtio-forwarder``, ``smart-nic`` + and ``remote-managed``. What type of vNIC is actually available depends on deployments. The default is ``normal``. in: body @@ -2730,6 +2856,18 @@ in: body required: true type: string +description_taf: + description: | + The description for this Tap Flow. + in: body + required: true + type: string +description_tas: + description: | + The description for this Tap Service. + in: body + required: true + type: string destination_firewall_group_id-body-optional: description: | The ID of the remote destination firewall group. @@ -2829,6 +2967,12 @@ in: body required: true type: string +direction_taf: + description: | + Direction of the Tap flow. Possible options are: IN, OUT, BOTH + in: body + required: true + type: string dns_assignment: description: | Data assigned to a port by the Networking internal DNS including the @@ -4645,6 +4789,12 @@ in: body required: true type: array +mirror_port_tas: + description: | + Port to which the Tap service is connected. + in: body + required: true + type: string mtu: description: | The maximum transmission unit (MTU) value to @@ -4692,6 +4842,48 @@ in: body required: false type: string +ndp_proxies: + description: | + A list of ``ndp proxy`` object. + in: body + required: true + type: array +ndp_proxy: + description: | + A ``ndp proxy`` object. + in: body + required: true + type: object +ndp_proxy_id-body: + description: | + The ID of the ndp proxy + in: body + required: true + type: string +ndp_proxy_ip_address-body: + description: | + The IPv6 address which the ``ndp proxy`` annunciate to external network. + in: body + required: true + type: string +ndp_proxy_ip_address-body-request: + description: | + The IPv6 address which the ``ndp proxy`` annunciate to external network. + in: body + required: false + type: string +ndp_proxy_port_id-body: + description: | + The ID of the port for the ndp proxy. + in: body + required: true + type: string +ndp_proxy_router_id-body: + description: | + The ID of the router for the ndp proxy. + in: body + required: true + type: string network: description: | A ``network`` object. @@ -5423,6 +5615,20 @@ in: body required: true type: string +qos-rule-type-all-rules: + description: | + Set to ``true`` to return all QoS rule types implemented in the Neutron + server. + in: body + required: false + type: boolean +qos-rule-type-all-supported: + description: | + Set to ``true`` to return all QoS rule types supported by any loaded + driver. + in: body + required: false + type: boolean qos-rule-types: description: | A list of QoS ``rule_type`` objects. @@ -5899,6 +6105,26 @@ in: body required: false type: boolean +router-enable_ndp_proxy: + description: | + Enable NDP proxy attribute. ``true`` means NDP proxy is enabled for the + router, the IPv6 address of internal subnets attached to the router can be + published to external by create ``ndp_proxy``. ``false`` means NDP proxy is + disabled, the IPv6 address of internal subnets attached to the router can + not be published to external by ``ndp_proxy``. It is available when + ``router-extend-ndp-proxy`` extension is enabled. + in: body + required: true + type: boolean +router-enable_ndp_proxy-request: + description: | + Enable NDP proxy attribute. Default is ``false``, To persist this attribute + value, set the ``enable_ndp_proxy_by_default`` option in the + ``neutron.conf`` file. It is available when ``router-extend-ndp-proxy`` + extension is enabled. + in: body + required: false + type: boolean router-enable_snat: description: | Enable Source NAT (SNAT) attribute. @@ -6403,6 +6629,12 @@ in: body required: false type: string +source_port_taf: + description: | + Source port to which the Tap Flow is connected. + in: body + required: true + type: string started_at: description: | Time at which the agent was started. @@ -6428,6 +6660,18 @@ in: body required: true type: string +status_taf: + description: | + Human-readable description of the status for tap flow. + in: body + required: true + type: string +status_tas: + description: | + Human-readable description of the status for tap service. + in: body + required: true + type: string sub_ports: description: | A list of ports associated with the trunk. @@ -6698,18 +6942,48 @@ in: body required: true type: array +taf_id: + description: | + The id for the Tap Flow. + in: body + required: true + type: string +taf_name: + description: | + The name for the Tap Flow. + in: body + required: true + type: string tags: description: | The list of tags on the resource. in: body required: true type: array +tap_service_id: + description: | + Tap Service to which the Tap Flow belongs. + in: body + required: true + type: string target_tenant: description: | The ID of the tenant to which the RBAC policy will be enforced. in: body required: true type: string +tas_id: + description: | + Tha id for the Tap Service. + in: body + required: true + type: string +tas_name: + description: | + Tha name for the Tap Flow. + in: body + required: true + type: string topic: description: | The name of AMQP topic the agent is listening on such as @@ -6830,6 +7104,12 @@ in: body required: true type: array +vlan-filter_taf: + description: | + VLAN Ids to be mirrored in the form of range string. + in: body + required: true + type: boolean vlan_transparent: description: | Indicates the VLAN transparency mode of the network, which is diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/qos.inc python-neutron-lib-2.20.0/api-ref/source/v2/qos.inc --- python-neutron-lib-2.18.1/api-ref/source/v2/qos.inc 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/qos.inc 2022-02-17 10:28:33.000000000 +0000 @@ -34,6 +34,14 @@ Error response codes: 401 +Request +------- + +.. rest_parameters:: parameters.yaml + + - all_supported: qos-rule-type-all-supported + - all_rules: qos-rule-type-all-rules + Response Parameters ------------------- diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/router-ndp-proxy.inc python-neutron-lib-2.20.0/api-ref/source/v2/router-ndp-proxy.inc --- python-neutron-lib-2.18.1/api-ref/source/v2/router-ndp-proxy.inc 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/router-ndp-proxy.inc 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,251 @@ +.. -*- rst -*- + +============================== +Router NDP proxy (ndp_proxies) +============================== + +A ``ndp_proxy`` is a logical entity for annunciate a unique IPv6 address to +external network. It depends on a ``router`` entity on which external gateway +is enabled. + +List ndp proxies +================ + +.. rest_method:: GET /v2.0/ndp_proxies + +Lists logical ndp_proxies that the project who submits the request can +access. + +Default policy settings return only those ndp_proxies that the project +who submits the request owns, unless an administrative user submits +the request. + +Use the ``fields`` query parameter to control which fields are +returned in the response body. Additionally, you can filter results +by using query string parameters. For information, see `Filtering +and Column Selection `__. + +Normal response codes: 200 + +Error response codes: 401 + +Request +------- + +.. rest_parameters:: parameters.yaml + + - id: id-query + - tenant_id: project_id-query + - project_id: project_id-query + - name: name-query + - description: description-query + - router_id: ndp_proxy-router-id-query + - port_id: ndp_proxy-port-id-query + - ip_address: ndp_proxy-ip-address-query + - revision_number: revision_number-query + - sort_dir: sort_dir + - sort_key: ndp_proxy-sort_key + - fields: fields + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - ndp_proxies: ndp_proxies + - name: name + - id: ndp_proxy_id-body + - description: description + - tenant_id: project_id + - project_id: project_id + - revision_number: revision_number + - router_id: ndp_proxy_router_id-body + - port_id: ndp_proxy_port_id-body + - ip_address: ndp_proxy_ip_address-body + - created_at: created_at_resource + - updated_at: updated_at_resource + +Response Example +---------------- + +.. literalinclude:: samples/ndp_proxies/ndp-proxies-list-response.json + :language: javascript + + +Show ndp proxy details +====================== + +.. rest_method:: GET /v2.0/ndp_proxies/{ndp_proxy_id} + +Shows information for a ndp proxy + +Use the ``fields`` query parameter to control which fields are returned in the response body. +For information, see `Filtering and Column Selection `__. + +Normal response codes: 200 + +Error response codes: 401, 404 + +Request +------- + +.. rest_parameters:: parameters.yaml + + - ndp_proxy_id: ndp_proxy_id-path + - fields: fields + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - ndp_proxy: ndp_proxy + - name: name + - id: ndp_proxy_id-body + - description: description + - tenant_id: project_id + - project_id: project_id + - revision_number: revision_number + - router_id: ndp_proxy_router_id-body + - port_id: ndp_proxy_port_id-body + - ip_address: ndp_proxy_ip_address-body + - created_at: created_at_resource + - updated_at: updated_at_resource + +Response Example +---------------- + +.. literalinclude:: samples/ndp_proxies/ndp-proxy-show-response.json + :language: javascript + + +Update a ndp proxy +================== + +.. rest_method:: PUT /v2.0/ndp_proxies/{ndp_proxy_id} + +Updates a ndp proxy + +Normal response codes: 200 + +Error response codes: 400, 401, 404 + +Request +------- + +.. rest_parameters:: parameters.yaml + + - ndp_proxy_id: ndp_proxy_id-path + - ndp_proxy: ndp_proxy + - name: name + - description: description-request-put + +Request Example +--------------- + +.. literalinclude:: samples/ndp_proxies/ndp-proxy-update-request.json + :language: javascript + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - ndp_proxy: ndp_proxy + - name: name + - id: ndp_proxy_id-body + - description: description + - tenant_id: project_id + - project_id: project_id + - revision_number: revision_number + - router_id: ndp_proxy_router_id-body + - port_id: ndp_proxy_port_id-body + - ip_address: ndp_proxy_ip_address-body + - created_at: created_at_resource + - updated_at: updated_at_resource + +Response Example +---------------- + +.. literalinclude:: samples/ndp_proxies/ndp-proxy-update-response.json + :language: javascript + + +Create ndp proxy +================ + +.. rest_method:: POST /v2.0/ndp_proxies + +Creates a ndp proxy + +Normal response codes: 201 + +Error response codes: 400, 401 + +Request +------- + +.. rest_parameters:: parameters.yaml + + - ndp_proxy: ndp_proxy + - name: name-request + - router_id: ndp_proxy_router_id-body + - port_id: ndp_proxy_port_id-body + - ip_address: ndp_proxy_ip_address-body-request + - description: description-request + +Request Example +--------------- + +.. literalinclude:: samples/ndp_proxies/ndp-proxy-create-request.json + :language: javascript + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - ndp_proxy: ndp_proxy + - name: name + - id: ndp_proxy_id-body + - description: description + - tenant_id: project_id + - project_id: project_id + - revision_number: revision_number + - router_id: ndp_proxy_router_id-body + - port_id: ndp_proxy_port_id-body + - ip_address: ndp_proxy_ip_address-body + - created_at: created_at_resource + - updated_at: updated_at_resource + +Response Example +---------------- + +.. literalinclude:: samples/ndp_proxies/ndp-proxy-create-response.json + :language: javascript + + +Delete a ndp proxy +================== + +.. rest_method:: DELETE /v2.0/ndp_proxies/{ndp_proxy_id} + +Deletes a ndp proxy. + +Normal response codes: 204 + +Error response codes: 404 + +Request +------- + +.. rest_parameters:: parameters.yaml + + - ndp_proxy_id: ndp_proxy_id-path + +Response +-------- + +There is no body content for the response of a successful DELETE request. diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/routers.inc python-neutron-lib-2.20.0/api-ref/source/v2/routers.inc --- python-neutron-lib-2.18.1/api-ref/source/v2/routers.inc 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/routers.inc 2022-02-17 10:28:33.000000000 +0000 @@ -143,6 +143,13 @@ BFD monitors for Extraroutes extension (``bfd-for-extraroutes``) adds ``bfd_monitor_id`` field to the extraroutes dictionary. +Router enable ndp proxy extension (router-extend-ndp-proxy) +=========================================================== + +The ``router-extend-ndp-proxy`` extension adds a ``enable_ndp_proxy`` parameter +to router. If this parameter is set as ``false``, the router don't support +``ndp_proxy``. + .. warning:: This API extension was merged as experimental to enable parallel @@ -221,6 +228,7 @@ - updated_at: updated_at_resource - tags: tags - conntrack_helpers: router-conntrack_helpers + - enable_ndp_proxy: router-enable_ndp_proxy Response Example ---------------- @@ -266,6 +274,7 @@ - availability_zone_hints: router-availability_zone_hints-request - service_type_id: router-service_type_id-request - flavor_id: router-flavor_id-optional + - enable_ndp_proxy: router-enable_ndp_proxy-request Request Example --------------- @@ -302,6 +311,7 @@ - updated_at: updated_at_resource - tags: tags - conntrack_helpers: router-conntrack_helpers + - enable_ndp_proxy: router-enable_ndp_proxy Response Example ---------------- @@ -363,6 +373,7 @@ - updated_at: updated_at_resource - tags: tags - conntrack_helpers: router-conntrack_helpers + - enable_ndp_proxy: router-enable_ndp_proxy Response Example ---------------- @@ -399,6 +410,7 @@ - description: description-request - routes: router-routes-request - distributed: router-distributed-request + - enable_ndp_proxy: router-enable_ndp_proxy-request Request Example --------------- @@ -435,6 +447,7 @@ - updated_at: updated_at_resource - tags: tags - conntrack_helpers: router-conntrack_helpers + - enable_ndp_proxy: router-enable_ndp_proxy Response Example ---------------- diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/ndp_proxies/ndp-proxies-list-response.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/ndp_proxies/ndp-proxies-list-response.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/ndp_proxies/ndp-proxies-list-response.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/ndp_proxies/ndp-proxies-list-response.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,30 @@ +{ + "ndp_proxies": [ + { + "name": "proxy1", + "id": "b930d7f6-ceb7-40a0-8b81-a425dd994ccf", + "router_id": "915a14a6-867b-4af7-83d1-70efceb146f9", + "port_id": "f7b14d9a-b0dc-4fbe-bb14-a0f4970a69e0", + "ip_address": "2001::1:56", + "revision_number": 1, + "project_id": "0bd18306d801447bb457a46252d82d13", + "tenant_id": "0bd18306d801447bb457a46252d82d13", + "created_at": "2021-07-16T19:17:04Z", + "updated_at": "2021-07-16T20:36:22Z", + "description": "" + }, + { + "name": "proxy2", + "id": "f8a44de0-fc8e-45df-93c7-f79bf3b01c95", + "router_id": "915a14a6-867b-4af7-83d1-70efceb146f9", + "port_id": "fc36c5b0-497b-42a3-8ef3-545f90756a41", + "ip_address": "2001::1:67", + "revision_number": 1, + "project_id": "0bd18306d801447bb457a46252d82d13", + "tenant_id": "0bd18306d801447bb457a46252d82d13", + "created_at": "2021-07-16T19:27:04Z", + "updated_at": "2021-07-16T20:38:22Z", + "description": "" + } + ] +} diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-create-request.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-create-request.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-create-request.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-create-request.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,9 @@ +{ + "ndp_proxy": { + "name": "ndp_proxy1", + "router_id": "1238be08-a2a8-4b8d-addf-fb5e2250e480", + "port_id": "6738be23-a398-445d-aaaf-785e4550e4cb", + "ip_address": "2001::1:6", + "description": "Some description" + } +} diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-create-response.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-create-response.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-create-response.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-create-response.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,15 @@ +{ + "ndp_proxy": { + "name": "ndp_proxy1", + "id": "b930d7f6-ceb7-40a0-8b81-a425dd994ccf", + "router_id": "1238be08-a2a8-4b8d-addf-fb5e2250e480", + "port_id": "6738be23-a398-445d-aaaf-785e4550e4cb", + "ip_address": "2001::1:6", + "revision_number": 0, + "project_id": "0bd18306d801447bb457a46252d82d13", + "tenant_id": "0bd18306d801447bb457a46252d82d13", + "created_at": "2021-07-16T19:17:04Z", + "updated_at": "2021-07-16T20:36:22Z", + "description": "Some description" + } +} diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-show-response.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-show-response.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-show-response.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-show-response.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,15 @@ +{ + "ndp_proxy": { + "name": "proxy1", + "id": "b930d7f6-ceb7-40a0-8b81-a425dd994ccf", + "router_id": "915a14a6-867b-4af7-83d1-70efceb146f9", + "port_id": "f7b14d9a-b0dc-4fbe-bb14-a0f4970a69e0", + "ip_address": "2001::1:56", + "revision_number": 1, + "project_id": "0bd18306d801447bb457a46252d82d13", + "tenant_id": "0bd18306d801447bb457a46252d82d13", + "created_at": "2021-07-16T19:17:04Z", + "updated_at": "2021-07-16T20:36:22Z", + "description": "" + } +} diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-update-request.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-update-request.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-update-request.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-update-request.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,6 @@ +{ + "ndp_proxy": { + "name": "new-name", + "description": "balabalabala" + } +} diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-update-response.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-update-response.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-update-response.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/ndp_proxies/ndp-proxy-update-response.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,15 @@ +{ + "ndp_proxy": { + "name": "new-name", + "id": "b930d7f6-ceb7-40a0-8b81-a425dd994ccf", + "router_id": "915a14a6-867b-4af7-83d1-70efceb146f9", + "port_id": "f7b14d9a-b0dc-4fbe-bb14-a0f4970a69e0", + "ip_address": "2001::1:56", + "revision_number": 3, + "project_id": "0bd18306d801447bb457a46252d82d13", + "tenant_id": "0bd18306d801447bb457a46252d82d13", + "created_at": "2021-07-16T19:17:04Z", + "updated_at": "2021-07-16T20:36:22Z", + "description": "balabalabala" + } +} diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/taf-create-request.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/taf-create-request.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/taf-create-request.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/taf-create-request.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,8 @@ +{ + "tap_flow": { + "name": "tf1", + "source_port": "ee2911c3-08e7-44cb-81aa-fbee2cf43168", + "tap_service_id": "1b059120-078b-4f25-bb16-e14d69706a9a", + "direction": "BOTH" + } +} \ No newline at end of file diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/taf-create-response.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/taf-create-response.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/taf-create-response.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/taf-create-response.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,14 @@ +{ + "tap_flow": { + "id": "137086d8-a77b-4bbc-825f-9c2f7b9bfa7b", + "tenant_id": "dad19b09dba44e589c022000d580e9d5", + "tap_service_id": "1b059120-078b-4f25-bb16-e14d69706a9a", + "name": "tf1", + "description": "", + "source_port": "ee2911c3-08e7-44cb-81aa-fbee2cf43168", + "direction": "BOTH", + "status": "DOWN", + "vlan_filter": null, + "project_id": "dad19b09dba44e589c022000d580e9d5" + } +} \ No newline at end of file diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/taf-list-response.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/taf-list-response.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/taf-list-response.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/taf-list-response.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,13 @@ +{ + "tap_flows": [ + { + "ID": "4082b3f6-387f-4d1e-b67e-f47f0dcd2926", + "Tenant": "dad19b09dba44e589c022000d580e9d5", + "Name": "tf1", + "Status": "ACTIVE", + "source_port": "ee2911c3-08e7-44cb-81aa-fbee2cf43168", + "tap_service_id": "1b059120-078b-4f25-bb16-e14d69706a9a", + "Direction": "BOTH" + } + ] +} diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/taf-show-response.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/taf-show-response.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/taf-show-response.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/taf-show-response.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,14 @@ +{ + "tap_flow": { + "id": "137086d8-a77b-4bbc-825f-9c2f7b9bfa7b", + "tenant_id": "dad19b09dba44e589c022000d580e9d5", + "tap_service_id": "1b059120-078b-4f25-bb16-e14d69706a9a", + "name": "tf1", + "description": "test tap flow", + "source_port": "ee2911c3-08e7-44cb-81aa-fbee2cf43168", + "direction": "BOTH", + "status": "DOWN", + "vlan_filter": null, + "project_id": "dad19b09dba44e589c022000d580e9d5" + } +} \ No newline at end of file diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/taf-update-request.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/taf-update-request.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/taf-update-request.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/taf-update-request.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,5 @@ +{ + "tap_flow": { + "description": "test tap flow" + } +} diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/taf-update-response.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/taf-update-response.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/taf-update-response.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/taf-update-response.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,14 @@ +{ + "tap_flow": { + "id": "137086d8-a77b-4bbc-825f-9c2f7b9bfa7b", + "tenant_id": "dad19b09dba44e589c022000d580e9d5", + "tap_service_id": "1b059120-078b-4f25-bb16-e14d69706a9a", + "name": "tf1", + "description": "test tap flow", + "source_port": "ee2911c3-08e7-44cb-81aa-fbee2cf43168", + "direction": "BOTH", + "status": "DOWN", + "vlan_filter": null, + "project_id": "dad19b09dba44e589c022000d580e9d5" + } +} \ No newline at end of file diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/tas-create-request.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/tas-create-request.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/tas-create-request.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/tas-create-request.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,6 @@ +{ + "tap_service": { + "name": "ts1", + "port_id": "a9855775-48ae-4609-8742-aa9d85db2e01" + } +} \ No newline at end of file diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/tas-create-response.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/tas-create-response.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/tas-create-response.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/tas-create-response.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,11 @@ +{ + "tap_service": { + "id": "2fec9339-f565-46d0-947b-1d98c2a406aa", + "tenant_id": "dad19b09dba44e589c022000d580e9d5", + "name": "tap_service-1", + "description": "tap service", + "port_id": "a9855775-48ae-4609-8742-aa9d85db2e01", + "status": "DOWN", + "project_id": "dad19b09dba44e589c022000d580e9d5" + } +} diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/tas-list-response.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/tas-list-response.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/tas-list-response.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/tas-list-response.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,11 @@ +{ + "tap_services": [ + { + "id": "257bcb47-5134-4ee9-b5cc-762d99ddae0b", + "tenant_id": "dad19b09dba44e589c022000d580e9d5", + "name": "tap_service-1", + "port_id": "a9855775-48ae-4609-8742-aa9d85db2e01", + "status": "ACTIVE" + } + ] +} diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/tas-show-response.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/tas-show-response.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/tas-show-response.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/tas-show-response.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,11 @@ +{ + "tap_service": { + "id": "1b059120-078b-4f25-bb16-e14d69706a9a", + "tenant_id": "dad19b09dba44e589c022000d580e9d5", + "name": "ts1", + "description": "", + "port_id": "a9855775-48ae-4609-8742-aa9d85db2e01", + "status": "ACTIVE", + "project_id": "dad19b09dba44e589c022000d580e9d5" + } +} diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/tas-update-request.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/tas-update-request.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/tas-update-request.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/tas-update-request.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,5 @@ +{ + "tap_service": { + "description": "test tap service" + } +} diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/tas-update-response.json python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/tas-update-response.json --- python-neutron-lib-2.18.1/api-ref/source/v2/samples/taas/tas-update-response.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/samples/taas/tas-update-response.json 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,11 @@ +{ + "tap_service": { + "id": "2fec9339-f565-46d0-947b-1d98c2a406aa", + "tenant_id": "dad19b09dba44e589c022000d580e9d5", + "name": "ts1", + "description": "test tas", + "port_id": "a9855775-48ae-4609-8742-aa9d85db2e01", + "status": "ACTIVE", + "project_id": "dad19b09dba44e589c022000d580e9d5" + } +} diff -Nru python-neutron-lib-2.18.1/api-ref/source/v2/taas.inc python-neutron-lib-2.20.0/api-ref/source/v2/taas.inc --- python-neutron-lib-2.18.1/api-ref/source/v2/taas.inc 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/api-ref/source/v2/taas.inc 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,430 @@ +.. -*- rst -*- + +================ +Tap As A Service +================ + +TaaS plugin provides a mechanism to mirror certain traffic +(for example tagged with specific VLANs) from a source VM to any traffic analyzer VM. +When packet will be forwarded, the original value of source and target ip/ports +information will not be altered and the system administrator will be able to run, +for ex. ``tcpdump``, on the target VM to trace these packets. + +TaaS plugin mainly consists of ``tap service`` and ``tap flow``. + +VLAN filter +=========== + +The ``VLAN filtering`` for Neutron Tap as a Service allows to filter +traffic comming from ``tap-flows`` by VLAN id in case of mirroring SRIOV +ports. + +Tap Service +=========== + +TapService represents the port to which the mirrored traffic is delivered. + +List Tap Services +================= + +.. rest_method:: GET /v2.0/taas/tap_services + +List tap services that belong to a given project. + +The list might be empty. + +Normal response codes: 200 + +Error response codes: 401 + +Request Parameters +------------------ + +.. rest_parameters:: parameters.yaml + + - project: project_id-query + - project-domain: project-domain_taas + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - id: tas_id + - tenant_id: project_id + - port: mirror_port_tas + - status: status_tas + +Response Example +---------------- + +.. literalinclude:: samples/taas/tas-list-response.json + :language: javascript + +Create Tap Service +================== + +.. rest_method:: POST /v2.0/taas/tap_services + +Create a Tap Service by passing the following JSON-encoded data. +``name``, ``monitoring port`` as mandatory parameters and +``description`` as optional parameter. + +Normal response codes: 201 + +Error response codes: 401, 403, 404, 409 + +Request Parameters +------------------ + +.. rest_parameters:: parameters.yaml + + - project: project_id-query + - project-domain: project-domain_taas + - tenant_id: project_id-query + - name: tas_name-query + - port: mirror_port_tas-query + - description: description_tas-query + +Request Example +--------------- + +.. literalinclude:: samples/taas/tas-create-request.json + :language: javascript + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - id: tas_id + - tenant_id: project_id + - name: tas_name + - port: mirror_port_tas + - status: status_tas + - description: description_tas + - project_id: project_id + +Response Example +---------------- + +.. literalinclude:: samples/taas/tas-create-response.json + :language: javascript + +Update Tap Service +================== + +.. rest_method:: PUT /v2.0/taas/tap_services/{tap_service_id/name} + +Update Tap Service by passing tap service ``name`` or ``id`` as JSON-encoded data. +Name or description or both can only be updated. + +Normal response codes: 200 + +Error response codes: 400, 401, 404, 412 + +Request Parameters +------------------ + +.. rest_parameters:: parameters.yaml + + - name: tas_name-query + - description: description_tas-query + +Request Example +--------------- + +.. literalinclude:: samples/taas/tas-update-request.json + :language: javascript + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - id: tas_id + - name: tas_name + - port: mirror_port_tas + - status: status_tas + - description: description_tas + - project_id: project_id + +Response Example +---------------- + +.. literalinclude:: samples/taas/tas-update-response.json + :language: javascript + +Delete Tap Service +================== + +.. rest_method:: DELETE /v2.0/taas/tap_services/{tap_service_id/name} + +Delete Tap Service by passing tap service ``name`` or ``id`` as JSON-encoded data. + +Normal response codes: 204 + +Error response codes: 400, 401, 404, 412 + +Request Parameters +------------------ + +.. rest_parameters:: parameters.yaml + + - name: tas_name-query + - id: tas_id-query + +Response Parameters +------------------- + +There is no body content for the response of a successful DELETE request. + +Show Tap Service +================ + +.. rest_method:: GET /v2.0/taas/tap_services/{tap_service_id/name} + +Show details for a tap service by passing tap service ``name`` or ``id`` as JSON-encoded data. + +Normal response codes: 200 + +Error response codes: 401, 404 + +Request Parameters +------------------ + +.. rest_parameters:: parameters.yaml + + - project: project_id-query + - project-domain: project-domain_taas + - name: tas_name-query + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - id: tas_id + - name: tas_name + - port: mirror_port_tas + - status: status_tas + - description: description_tas + - project_id: project_id + - tenant_id: project_id + +Response Example +---------------- + +.. literalinclude:: samples/taas/tas-show-response.json + :language: javascript + + +Tap Flow +======== + +TapFlow represents the port from which the traffic needs to be mirrored. +It can be a port associated with VM on another cloud network. + +List Tap Flow +============= + +.. rest_method:: GET /v2.0/taas/tap_flows + +List tap flow that belong to a given tenant. + +The list might be empty. + +Normal response codes: 200 + +Error response codes: 401 + +Request Parameters +------------------ + +.. rest_parameters:: parameters.yaml + + - project: project_id-query + - project-domain: project-domain_taas + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - id: taf_id + - port: source_port_taf + - status: status_tas + +Response Example +---------------- + +.. literalinclude:: samples/taas/taf-list-response.json + :language: javascript + +Create Tap Flow +=============== + +.. rest_method:: POST /v2.0/taas/tap_flows + +Create a Tap Flow by passing the following JSON-encoded data. +``name``, ``source port``, ``direction`` as ``IN/OUT/BOTH`` +``tap_service`` as mandatory parameters and +``description`` as optional parameter. + +Normal response codes: 201 + +Error response codes: 401, 403, 404, 409 + +Request Parameters +------------------ + +.. rest_parameters:: parameters.yaml + + - project: project_id-query + - project-domain: project-domain_taas + - tenant_id: project_id-query + - name: taf_name-query + - port: source_port_taf-query + - tap_service: tap_service_id-query + - vlan_filter: vlan-filter_taf-query + - direction: direction_taf-query + - description: description_taf-query + +Request Example +--------------- + +.. literalinclude:: samples/taas/taf-create-request.json + :language: javascript + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - id: taf_id + - name: taf_name + - port: source_port_taf + - status: status_taf + - tap_service: tap_service_id + - direction: description_taf + - project_id: project_id + - tenant_id: project_id + +Response Example +---------------- + +.. literalinclude:: samples/taas/taf-create-response.json + :language: javascript + +Update Tap Flow +=============== + +.. rest_method:: PUT /v2.0/taas/tap_flows/{taf_service_id/name} + +Update Tap Flow by passing tap flow ``name`` or ``id`` as JSON-encoded data. +Name or description or both can only be updated. + +Normal response codes: 200 + +Error response codes: 400, 401, 404, 412 + +Request Parameters +------------------ + +.. rest_parameters:: parameters.yaml + + - name: taf_name-query + - description: description_taf-query + +Request Example +--------------- + +.. literalinclude:: samples/taas/taf-update-request.json + :language: javascript + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - id: taf_id + - name: taf_name + - port: source_port_taf + - status: status_tas + - tap_service: tap_service_id + - direction: description_taf + - project_id: project_id + - tenant_id: project_id + +Response Example +---------------- + +.. literalinclude:: samples/taas/taf-update-response.json + :language: javascript + +Delete Tap Flow +=============== + +.. rest_method:: DELETE /v2.0/taas/tap_flows/{tap_service_id/name} + +Delete Tap Flow by passing tap flow ``name`` or ``id`` as JSON-encoded data. + +Normal response codes: 204 + +Error response codes: 400, 401, 404, 412 + +Request Parameters +------------------ + +.. rest_parameters:: parameters.yaml + + - id: taf_id-query + - name: taf_name-query + +Response Parameters +------------------- + +On successful ``DELETE`` request ``Tap flow {tap_flow_id} deleted.`` +message will be displayed. + +Show Tap Flow +============= + +.. rest_method:: GET /v2.0/taas/tap_flows/{tap_flows_id/name} + +Show details for a tap flow by passing tap flow ``name`` or ``id`` as JSON-encoded data. + +Normal response codes: 200 + +Error response codes: 401, 404 + +Request Parameters +------------------ + +.. rest_parameters:: parameters.yaml + + - project: project_id-query + - project-domain: project-domain_taas + - tenant_id: project_id-query + - id: taf_id-query + - name: taf_name-query + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - id: taf_id + - name: taf_name + - port: source_port_taf + - status: status_taf + - tap_service: tap_service_id + - direction: description_taf + - project_id: project_id + - tenant_id: project_id + +Response Example +---------------- + +.. literalinclude:: samples/taas/taf-show-response.json + :language: javascript \ No newline at end of file diff -Nru python-neutron-lib-2.18.1/AUTHORS python-neutron-lib-2.20.0/AUTHORS --- python-neutron-lib-2.18.1/AUTHORS 2022-01-05 15:42:10.000000000 +0000 +++ python-neutron-lib-2.20.0/AUTHORS 2022-02-17 10:29:11.000000000 +0000 @@ -34,6 +34,7 @@ Darla Ahlert Deepthi V V Dirk Mueller +Dmitrii Shcherbakov Dongcan Ye Doug Hellmann Doug Wiegley @@ -183,6 +184,7 @@ pedro rajesh.kudaka reedip +shanyunfan33 shubhendu triveni venkata anil @@ -201,3 +203,4 @@ zhu.boxiang zhufl zhulingjie +zitptan diff -Nru python-neutron-lib-2.18.1/ChangeLog python-neutron-lib-2.20.0/ChangeLog --- python-neutron-lib-2.18.1/ChangeLog 2022-01-05 15:42:10.000000000 +0000 +++ python-neutron-lib-2.20.0/ChangeLog 2022-02-17 10:29:11.000000000 +0000 @@ -1,11 +1,30 @@ CHANGES ======= +2.20.0 +------ + +* api-ref for ndp proxy +* Add filter flags for QoS rule types +* Add VNIC\_REMOTE\_MANAGED for off-path backends +* Add "connectivity" property to "MechanismDriver" + +2.19.0 +------ + +* Move API definitions of taas to neutron-lib +* remove unicode from code +* Enforce policy for qos\_policy\_id attribute +* Add "get\_workers" method to "QuotaDriverAPI" class +* Fix collect duplicates TypeError for dict values +* Add api-ref for tap service and tap flow + 2.18.1 ------ * Log resource id in the callbacks publish method * Remove import statement for six +* Rehome ovs related constants to the separate module 2.18.0 ------ diff -Nru python-neutron-lib-2.18.1/debian/changelog python-neutron-lib-2.20.0/debian/changelog --- python-neutron-lib-2.18.1/debian/changelog 2022-01-05 19:43:28.000000000 +0000 +++ python-neutron-lib-2.20.0/debian/changelog 2022-03-02 18:29:46.000000000 +0000 @@ -1,3 +1,9 @@ +python-neutron-lib (2.20.0-0ubuntu1) jammy; urgency=medium + + * New upstream release for OpenStack Yoga. + + -- Corey Bryant Wed, 02 Mar 2022 13:29:46 -0500 + python-neutron-lib (2.18.1-0ubuntu1) jammy; urgency=medium * New upstream release for OpenStack Yoga. diff -Nru python-neutron-lib-2.18.1/doc/source/conf.py python-neutron-lib-2.20.0/doc/source/conf.py --- python-neutron-lib-2.18.1/doc/source/conf.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/doc/source/conf.py 2022-02-17 10:28:33.000000000 +0000 @@ -56,8 +56,8 @@ master_doc = 'index' # General information about the project. -project = u'Neutron Library' -copyright = u'2015-present, OpenStack Foundation.' +project = 'Neutron Library' +copyright = '2015-present, OpenStack Foundation.' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -191,8 +191,8 @@ # (source start file, target name, title, author, # documentclass [howto/manual]). latex_documents = [ - ('index', 'doc-neutron-lib.tex', u'Neutron Library Documentation', - u'Neutron development team', 'manual'), + ('index', 'doc-neutron-lib.tex', 'Neutron Library Documentation', + 'Neutron development team', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of diff -Nru python-neutron-lib-2.18.1/neutron_lib/api/definitions/base.py python-neutron-lib-2.20.0/neutron_lib/api/definitions/base.py --- python-neutron-lib-2.18.1/neutron_lib/api/definitions/base.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/api/definitions/base.py 2022-02-17 10:28:33.000000000 +0000 @@ -147,6 +147,7 @@ 'qos-port-network-policy', 'qos-pps-minimum', 'qos-pps-minimum-rule-alias', + 'qos-rule-type-filter', 'qos-rules-alias', 'quotas', 'quota-check-limit', @@ -196,6 +197,10 @@ # https://opendev.org/openstack/networking-sfc: 'flow_classifier', 'sfc', + + # https://opendev.org/openstack/tap-as-a-service + 'taas', + 'taas-vlan-filter', ) KNOWN_KEYWORDS = ( diff -Nru python-neutron-lib-2.18.1/neutron_lib/api/definitions/__init__.py python-neutron-lib-2.20.0/neutron_lib/api/definitions/__init__.py --- python-neutron-lib-2.18.1/neutron_lib/api/definitions/__init__.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/api/definitions/__init__.py 2022-02-17 10:28:33.000000000 +0000 @@ -107,6 +107,7 @@ from neutron_lib.api.definitions import qos_pps_minimum_rule_alias from neutron_lib.api.definitions import qos_pps_rule from neutron_lib.api.definitions import qos_rule_type_details +from neutron_lib.api.definitions import qos_rule_type_filter from neutron_lib.api.definitions import qos_rules_alias from neutron_lib.api.definitions import quota_check_limit from neutron_lib.api.definitions import rbac_address_groups @@ -139,10 +140,12 @@ from neutron_lib.api.definitions import subnet_service_types from neutron_lib.api.definitions import subnetpool from neutron_lib.api.definitions import subnetpool_prefix_ops +from neutron_lib.api.definitions import taas from neutron_lib.api.definitions import tag_ports_during_bulk_creation from neutron_lib.api.definitions import trunk from neutron_lib.api.definitions import trunk_details from neutron_lib.api.definitions import uplink_status_propagation +from neutron_lib.api.definitions import vlan_filter from neutron_lib.api.definitions import vlantransparent from neutron_lib.api.definitions import vpn from neutron_lib.api.definitions import vpn_endpoint_groups @@ -247,6 +250,7 @@ qos_pps_minimum_rule_alias, qos_pps_rule, qos_rule_type_details, + qos_rule_type_filter, qos_rules_alias, quota_check_limit, rbac_address_groups, @@ -279,10 +283,12 @@ subnet_service_types, subnetpool, subnetpool_prefix_ops, + taas, tag_ports_during_bulk_creation, trunk, trunk_details, uplink_status_propagation, + vlan_filter, vlantransparent, vpn, vpn_endpoint_groups, diff -Nru python-neutron-lib-2.18.1/neutron_lib/api/definitions/portbindings.py python-neutron-lib-2.20.0/neutron_lib/api/definitions/portbindings.py --- python-neutron-lib-2.18.1/neutron_lib/api/definitions/portbindings.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/api/definitions/portbindings.py 2022-02-17 10:28:33.000000000 +0000 @@ -127,11 +127,12 @@ # (https://wiki.openstack.org/wiki/Cyborg). VNIC_ACCELERATOR_DIRECT = 'accelerator-direct' VNIC_ACCELERATOR_DIRECT_PHYSICAL = 'accelerator-direct-physical' +VNIC_REMOTE_MANAGED = 'remote-managed' VNIC_TYPES = [VNIC_NORMAL, VNIC_DIRECT, VNIC_MACVTAP, VNIC_BAREMETAL, VNIC_DIRECT_PHYSICAL, VNIC_VIRTIO_FORWARDER, VNIC_SMARTNIC, VNIC_VHOST_VDPA, VNIC_ACCELERATOR_DIRECT, - VNIC_ACCELERATOR_DIRECT_PHYSICAL] + VNIC_ACCELERATOR_DIRECT_PHYSICAL, VNIC_REMOTE_MANAGED] # VIF_DETAILS_CONNECTIVITY: Indicates what kind of connectivity the network # back-end provides: L2, L3 or not specified. diff -Nru python-neutron-lib-2.18.1/neutron_lib/api/definitions/qos_fip.py python-neutron-lib-2.20.0/neutron_lib/api/definitions/qos_fip.py --- python-neutron-lib-2.18.1/neutron_lib/api/definitions/qos_fip.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/api/definitions/qos_fip.py 2022-02-17 10:28:33.000000000 +0000 @@ -31,6 +31,7 @@ 'allow_put': True, 'is_visible': True, 'default': None, + 'enforce_policy': True, 'validate': {'type:uuid_or_none': None}} } } diff -Nru python-neutron-lib-2.18.1/neutron_lib/api/definitions/qos.py python-neutron-lib-2.20.0/neutron_lib/api/definitions/qos.py --- python-neutron-lib-2.18.1/neutron_lib/api/definitions/qos.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/api/definitions/qos.py 2022-02-17 10:28:33.000000000 +0000 @@ -94,6 +94,7 @@ 'allow_put': True, 'is_visible': True, 'default': None, + 'enforce_policy': True, 'validate': {'type:uuid_or_none': None} } }, @@ -103,6 +104,7 @@ 'allow_put': True, 'is_visible': True, 'default': None, + 'enforce_policy': True, 'validate': {'type:uuid_or_none': None} } } diff -Nru python-neutron-lib-2.18.1/neutron_lib/api/definitions/qos_rule_type_filter.py python-neutron-lib-2.20.0/neutron_lib/api/definitions/qos_rule_type_filter.py --- python-neutron-lib-2.18.1/neutron_lib/api/definitions/qos_rule_type_filter.py 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/api/definitions/qos_rule_type_filter.py 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,55 @@ +# Copyright 2022 Red Hat, Inc. +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from neutron_lib.api import converters +from neutron_lib.api.definitions import qos as qos_apidef +from neutron_lib import constants + + +ALIAS = 'qos-rule-type-filter' +IS_SHIM_EXTENSION = False +IS_STANDARD_ATTR_EXTENSION = False +NAME = 'Allow to filter the list of QoS rule types' +API_PREFIX = '' +DESCRIPTION = ('Allows to filter the QoS rule type list adding two new flags. ' + '"all_rules" prints all implemented QoS rule types.' + '"all_supported" prints all supported QoS rule types by the ' + 'loaded mechanism drivers') +UPDATED_TIMESTAMP = '2022-02-02T10:00:00-00:00' +QOS_RULE_TYPE_ALL_SUPPORTED = 'all_supported' +QOS_RULE_TYPE_ALL_RULES = 'all_rules' +RESOURCE_ATTRIBUTE_MAP = { + qos_apidef.RULE_TYPES: { + QOS_RULE_TYPE_ALL_RULES: { + 'allow_post': True, 'allow_put': True, + 'convert_to': converters.convert_to_boolean_if_not_none, + 'default': constants.ATTR_NOT_SPECIFIED, + 'is_filter': True, + 'is_visible': False + }, + QOS_RULE_TYPE_ALL_SUPPORTED: { + 'allow_post': True, 'allow_put': True, + 'convert_to': converters.convert_to_boolean_if_not_none, + 'default': constants.ATTR_NOT_SPECIFIED, + 'is_filter': True, + 'is_visible': False + } + } +} +SUB_RESOURCE_ATTRIBUTE_MAP = {} +ACTION_MAP = {} +REQUIRED_EXTENSIONS = [qos_apidef.ALIAS] +OPTIONAL_EXTENSIONS = [] +ACTION_STATUS = {} diff -Nru python-neutron-lib-2.18.1/neutron_lib/api/definitions/taas.py python-neutron-lib-2.20.0/neutron_lib/api/definitions/taas.py --- python-neutron-lib-2.18.1/neutron_lib/api/definitions/taas.py 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/api/definitions/taas.py 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,89 @@ +# Copyright (C) 2015 Ericsson AB +# Copyright (c) 2015 Gigamon +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +direction_enum = ['IN', 'OUT', 'BOTH'] + +''' +Resource Attribute Map: + +Note: + +'tap_services' data model refers to the Tap Service created. +port_id specifies destination port to which the mirrored data is sent. +''' + +ALIAS = 'taas' +IS_SHIM_EXTENSION = False +IS_STANDARD_ATTR_EXTENSION = False +NAME = "Neutron Tap as a Service" +DESCRIPTION = "Neutron Tap as a Service Extension." +UPDATED_TIMESTAMP = "2015-01-14T10:00:00-00:00" +RESOURCE_NAME = 'tap_service' +COLLECTION_NAME = 'tap_services' +TAP_FLOW = 'tap_flow' +TAP_FLOWS = 'tap_flows' + +RESOURCE_ATTRIBUTE_MAP = { + COLLECTION_NAME: { + 'id': {'allow_post': False, 'allow_put': False, + 'validate': {'type:uuid': None}, 'is_visible': True, + 'primary_key': True}, + 'tenant_id': {'allow_post': True, 'allow_put': False, + 'validate': {'type:string': None}, + 'required_by_policy': True, 'is_visible': True}, + 'name': {'allow_post': True, 'allow_put': True, + 'validate': {'type:string': None}, + 'is_visible': True, 'default': ''}, + 'description': {'allow_post': True, 'allow_put': True, + 'validate': {'type:string': None}, + 'is_visible': True, 'default': ''}, + 'port_id': {'allow_post': True, 'allow_put': False, + 'validate': {'type:uuid': None}, + 'is_visible': True}, + 'status': {'allow_post': False, 'allow_put': False, + 'is_visible': True} + }, + TAP_FLOWS: { + 'id': {'allow_post': False, 'allow_put': False, + 'validate': {'type:uuid': None}, 'is_visible': True, + 'primary_key': True}, + 'tenant_id': {'allow_post': True, 'allow_put': False, + 'validate': {'type:string': None}, + 'required_by_policy': True, 'is_visible': True}, + 'name': {'allow_post': True, 'allow_put': True, + 'validate': {'type:string': None}, + 'is_visible': True, 'default': ''}, + 'description': {'allow_post': True, 'allow_put': True, + 'validate': {'type:string': None}, + 'is_visible': True, 'default': ''}, + 'tap_service_id': {'allow_post': True, 'allow_put': False, + 'validate': {'type:uuid': None}, + 'required_by_policy': True, 'is_visible': True}, + 'source_port': {'allow_post': True, 'allow_put': False, + 'validate': {'type:uuid': None}, + 'required_by_policy': True, 'is_visible': True}, + 'direction': {'allow_post': True, 'allow_put': False, + 'validate': {'type:values': direction_enum}, + 'is_visible': True}, + 'status': {'allow_post': False, 'allow_put': False, + 'is_visible': True} + } +} +SUB_RESOURCE_ATTRIBUTE_MAP = None +ACTION_MAP = {} +ACTION_STATUS = {} +REQUIRED_EXTENSIONS = [] +OPTIONAL_EXTENSIONS = [] diff -Nru python-neutron-lib-2.18.1/neutron_lib/api/definitions/vlan_filter.py python-neutron-lib-2.20.0/neutron_lib/api/definitions/vlan_filter.py --- python-neutron-lib-2.18.1/neutron_lib/api/definitions/vlan_filter.py 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/api/definitions/vlan_filter.py 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,45 @@ +# Copyright (C) 2018 AT&T +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + +from neutron_lib.api.definitions import taas as taas_api_def + +ALIAS = 'taas-vlan-filter' +IS_SHIM_EXTENSION = False +IS_STANDARD_ATTR_EXTENSION = False +NAME = "VLAN filtering for Neutron Tap as a Service" +DESCRIPTION = "Neutron Tap as a Service Extension for filtering VLANs." +UPDATED_TIMESTAMP = "2018-01-14T10:00:00-00:00" +API_PREFIX = '/taas' +RESOURCE_NAME = 'tap_service' +COLLECTION_NAME = 'tap_services' +TAP_FLOW = 'tap_flow' +TAP_FLOWS = 'tap_flows' + +# Regex for a comma-seperate list of integer values (VLANs) +# For ex. "9,18,27-36,45-54" or "0-4095" or "9,18,27,36" +RANGE_REGEX = r"^([0-9]+(-[0-9]+)?)(,([0-9]+(-[0-9]+)?))*$" + +RESOURCE_ATTRIBUTE_MAP = { + taas_api_def.TAP_FLOWS: { + 'vlan_filter': {'allow_post': True, 'allow_put': False, + 'validate': {'type:regex_or_none': RANGE_REGEX}, + 'is_visible': True, 'default': None} + } +} +SUB_RESOURCE_ATTRIBUTE_MAP = None +ACTION_MAP = {} +ACTION_STATUS = {} +REQUIRED_EXTENSIONS = [taas_api_def.ALIAS] +OPTIONAL_EXTENSIONS = [] diff -Nru python-neutron-lib-2.18.1/neutron_lib/api/validators/__init__.py python-neutron-lib-2.20.0/neutron_lib/api/validators/__init__.py --- python-neutron-lib-2.18.1/neutron_lib/api/validators/__init__.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/api/validators/__init__.py 2022-02-17 10:28:33.000000000 +0000 @@ -78,14 +78,14 @@ :param data_list: A list of items to check for duplicates. The list may include dict items. - :returns: A set of items that are duplicates in data_list. If no - duplicates are found, the returned set is empty. + :returns: A list of items that are duplicates in data_list. If no + duplicates are found, the returned list is empty. """ seen = [] - dups = set() + dups = [] for datum in data_list: - if datum in seen: - dups.add(datum) + if datum in seen and datum not in dups: + dups.append(datum) continue seen.append(datum) return dups diff -Nru python-neutron-lib-2.18.1/neutron_lib/constants.py python-neutron-lib-2.20.0/neutron_lib/constants.py --- python-neutron-lib-2.18.1/neutron_lib/constants.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/constants.py 2022-02-17 10:28:33.000000000 +0000 @@ -682,214 +682,6 @@ ACCESS_READONLY = 'access_as_readonly' ACCESS_EXTERNAL = 'access_as_external' -####################### -# OVS related constants -####################### - -# Special vlan_tci value indicating flat network -FLAT_VLAN_TCI = '0x0000/0x1fff' - -# Topic for tunnel notifications between the plugin and agent -TUNNEL = 'tunnel' - -# Name prefixes for veth device or patch port pair linking the integration -# bridge with the physical bridge for a physical network -PEER_INTEGRATION_PREFIX = 'int-' -PEER_PHYSICAL_PREFIX = 'phy-' - -# Nonexistent peer used to create patch ports without associating them, it -# allows to define flows before association -NONEXISTENT_PEER = 'nonexistent-peer' - -# The different types of tunnels -TUNNEL_NETWORK_TYPES = [TYPE_GRE, TYPE_VXLAN, TYPE_GENEVE] - -# --- OpenFlow table IDs - -# --- Integration bridge (int_br) - -LOCAL_SWITCHING = 0 - -# The pyhsical network types of support DVR router -DVR_PHYSICAL_NETWORK_TYPES = [TYPE_VLAN, TYPE_FLAT] - -# Various tables for DVR use of integration bridge flows -DVR_TO_SRC_MAC = 1 -DVR_TO_SRC_MAC_PHYSICAL = 2 -ARP_DVR_MAC_TO_DST_MAC = 3 -ARP_DVR_MAC_TO_DST_MAC_PHYSICAL = 4 -CANARY_TABLE = 23 - -# Table for ARP poison/spoofing prevention rules -ARP_SPOOF_TABLE = 24 - -# Table for MAC spoof filtering -MAC_SPOOF_TABLE = 25 - -# Table to decide whether further filtering is needed -TRANSIENT_TABLE = 60 -LOCAL_MAC_DIRECT = 61 -TRANSIENT_EGRESS_TABLE = 62 - -# Table for DHCP -DHCP_IPV4_TABLE = 77 -DHCP_IPV6_TABLE = 78 - -# Tables used for ovs firewall -BASE_EGRESS_TABLE = 71 -RULES_EGRESS_TABLE = 72 -ACCEPT_OR_INGRESS_TABLE = 73 -BASE_INGRESS_TABLE = 81 -RULES_INGRESS_TABLE = 82 - -OVS_FIREWALL_TABLES = ( - BASE_EGRESS_TABLE, - RULES_EGRESS_TABLE, - ACCEPT_OR_INGRESS_TABLE, - BASE_INGRESS_TABLE, - RULES_INGRESS_TABLE, -) - -# Tables for parties interacting with ovs firewall -ACCEPTED_EGRESS_TRAFFIC_TABLE = 91 -ACCEPTED_INGRESS_TRAFFIC_TABLE = 92 -DROPPED_TRAFFIC_TABLE = 93 -ACCEPTED_EGRESS_TRAFFIC_NORMAL_TABLE = 94 - -INT_BR_ALL_TABLES = ( - LOCAL_SWITCHING, - DVR_TO_SRC_MAC, - DVR_TO_SRC_MAC_PHYSICAL, - CANARY_TABLE, - ARP_SPOOF_TABLE, - MAC_SPOOF_TABLE, - LOCAL_MAC_DIRECT, - TRANSIENT_TABLE, - TRANSIENT_EGRESS_TABLE, - BASE_EGRESS_TABLE, - RULES_EGRESS_TABLE, - ACCEPT_OR_INGRESS_TABLE, - DHCP_IPV4_TABLE, - DHCP_IPV6_TABLE, - BASE_INGRESS_TABLE, - RULES_INGRESS_TABLE, - ACCEPTED_EGRESS_TRAFFIC_TABLE, - ACCEPTED_INGRESS_TRAFFIC_TABLE, - DROPPED_TRAFFIC_TABLE) - -# --- Tunnel bridge (tun_br) - -# Various tables for tunneling flows -DVR_PROCESS = 1 -PATCH_LV_TO_TUN = 2 -GRE_TUN_TO_LV = 3 -VXLAN_TUN_TO_LV = 4 -GENEVE_TUN_TO_LV = 6 - -DVR_NOT_LEARN = 9 -LEARN_FROM_TUN = 10 -UCAST_TO_TUN = 20 -ARP_RESPONDER = 21 -FLOOD_TO_TUN = 22 -# NOTE(vsaienko): transit table used by networking-bagpipe driver to -# mirror traffic to EVPN and standard tunnels to gateway nodes -BAGPIPE_FLOOD_TO_TUN_BROADCAST = 222 - -TUN_BR_ALL_TABLES = ( - LOCAL_SWITCHING, - DVR_PROCESS, - PATCH_LV_TO_TUN, - GRE_TUN_TO_LV, - VXLAN_TUN_TO_LV, - GENEVE_TUN_TO_LV, - DVR_NOT_LEARN, - LEARN_FROM_TUN, - UCAST_TO_TUN, - ARP_RESPONDER, - FLOOD_TO_TUN) - -# --- Physical Bridges (phys_brs) - -# Various tables for DVR use of physical bridge flows -DVR_PROCESS_PHYSICAL = 1 -LOCAL_VLAN_TRANSLATION = 2 -DVR_NOT_LEARN_PHYSICAL = 3 - -PHY_BR_ALL_TABLES = ( - LOCAL_SWITCHING, - DVR_PROCESS_PHYSICAL, - LOCAL_VLAN_TRANSLATION, - DVR_NOT_LEARN_PHYSICAL) - -# --- end of OpenFlow table IDs - -# type for ARP reply in ARP header -ARP_REPLY = '0x2' - -# Map tunnel types to tables number -TUN_TABLE = {TYPE_GRE: GRE_TUN_TO_LV, - TYPE_VXLAN: VXLAN_TUN_TO_LV, - TYPE_GENEVE: GENEVE_TUN_TO_LV} - - -# The default respawn interval for the ovsdb monitor -DEFAULT_OVSDBMON_RESPAWN = 30 - -# Represent invalid OF Port -OFPORT_INVALID = -1 - -ARP_RESPONDER_ACTIONS = ('move:NXM_OF_ETH_SRC[]->NXM_OF_ETH_DST[],' - 'mod_dl_src:%(mac)s,' - 'load:0x2->NXM_OF_ARP_OP[],' - 'move:NXM_NX_ARP_SHA[]->NXM_NX_ARP_THA[],' - 'move:NXM_OF_ARP_SPA[]->NXM_OF_ARP_TPA[],' - 'load:%(mac)#x->NXM_NX_ARP_SHA[],' - 'load:%(ip)#x->NXM_OF_ARP_SPA[],' - 'in_port') - -# Represent ovs status -OVS_RESTARTED = 0 -OVS_NORMAL = 1 -OVS_DEAD = 2 - -EXTENSION_DRIVER_TYPE = 'ovs' - -# ovs datapath types -OVS_DATAPATH_SYSTEM = 'system' -OVS_DATAPATH_NETDEV = 'netdev' -OVS_DPDK_VHOST_USER = 'dpdkvhostuser' -OVS_DPDK_VHOST_USER_CLIENT = 'dpdkvhostuserclient' - -OVS_DPDK_PORT_TYPES = [OVS_DPDK_VHOST_USER, OVS_DPDK_VHOST_USER_CLIENT] - -# default ovs vhost-user socket location -VHOST_USER_SOCKET_DIR = '/var/run/openvswitch' - -MAX_DEVICE_RETRIES = 5 - -# OpenFlow version constants -OPENFLOW10 = "OpenFlow10" -OPENFLOW11 = "OpenFlow11" -OPENFLOW12 = "OpenFlow12" -OPENFLOW13 = "OpenFlow13" -OPENFLOW14 = "OpenFlow14" -OPENFLOW15 = "OpenFlow15" - -OPENFLOW_MAX_PRIORITY = 65535 - -# A placeholder for dead vlans. -DEAD_VLAN_TAG = MAX_VLAN_TAG + 1 - -# callback resource for setting 'bridge_name' in the 'binding:vif_details' -OVS_BRIDGE_NAME = 'ovs_bridge_name' - -# callback resource for notifying to ovsdb handler -OVSDB_RESOURCE = 'ovsdb' - -# Used in ovs port 'external_ids' in order mark it for no cleanup when -# ovs_cleanup script is used. -SKIP_CLEANUP = 'skip_cleanup' - # neutron-dynamic-routing constants MIN_ASNUM = 1 MAX_ASNUM = 65535 diff -Nru python-neutron-lib-2.18.1/neutron_lib/db/quota_api.py python-neutron-lib-2.20.0/neutron_lib/db/quota_api.py --- python-neutron-lib-2.18.1/neutron_lib/db/quota_api.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/db/quota_api.py 2022-02-17 10:28:33.000000000 +0000 @@ -167,3 +167,16 @@ :return: None if passed; ``OverQuota`` if quota limits are exceeded, ``InvalidQuotaValue`` if delta values are invalid. """ + + @staticmethod + @abc.abstractmethod + def get_workers(): + """Return the quota driver workers to be spawned during initialization + + This method returns the quota driver workers that needs to be spawned + during the plugin initialization. For example, ``DbQuotaNoLockDriver`` + requires a ``PeriodicWorker`` to clean up the expired reservations left + in the database. + + :return: list of ``worker.BaseWorker`` or derived instances. + """ diff -Nru python-neutron-lib-2.18.1/neutron_lib/exceptions/taas.py python-neutron-lib-2.20.0/neutron_lib/exceptions/taas.py --- python-neutron-lib-2.18.1/neutron_lib/exceptions/taas.py 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/exceptions/taas.py 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,46 @@ +# Copyright 2011 VMware, Inc +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +from neutron_lib._i18n import _ +from neutron_lib import exceptions as qexception + + +class TapServiceNotFound(qexception.NotFound): + message = _("Tap Service %(tap_id)s does not exist") + + +class TapFlowNotFound(qexception.NotFound): + message = _("Tap Flow %(flow_id)s does not exist") + + +class InvalidDestinationPort(qexception.NotFound): + message = _("Destination Port %(port)s does not exist") + + +class InvalidSourcePort(qexception.NotFound): + message = _("Source Port %(port)s does not exist") + + +class PortDoesNotBelongToTenant(qexception.NotAuthorized): + message = _("The specified port does not belong to the tenant") + + +class TapServiceNotBelongToTenant(qexception.NotAuthorized): + message = _("Specified Tap Service does not belong to the tenant") + + +class TapServiceLimitReached(qexception.OverQuota): + message = _("Reached the maximum quota for Tap Services") diff -Nru python-neutron-lib-2.18.1/neutron_lib/plugins/ml2/api.py python-neutron-lib-2.20.0/neutron_lib/plugins/ml2/api.py --- python-neutron-lib-2.18.1/neutron_lib/plugins/ml2/api.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/plugins/ml2/api.py 2022-02-17 10:28:33.000000000 +0000 @@ -14,6 +14,8 @@ import abc +from neutron_lib.api.definitions import portbindings + # The following keys are used in the segment dictionaries passed via # the driver API. @@ -469,6 +471,16 @@ """ return extensions + @property + def connectivity(self): + """Return the mechanism driver connectivity type + + The possible values are "l2", "l3" and "legacy" (default). + + :returns: a string in ("l2", "l3", "legacy") + """ + return portbindings.CONNECTIVITY_LEGACY + class _TypeDriverBase(object, metaclass=abc.ABCMeta): diff -Nru python-neutron-lib-2.18.1/neutron_lib/plugins/ml2/ovs_constants.py python-neutron-lib-2.20.0/neutron_lib/plugins/ml2/ovs_constants.py --- python-neutron-lib-2.18.1/neutron_lib/plugins/ml2/ovs_constants.py 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/plugins/ml2/ovs_constants.py 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,224 @@ +# Copyright (c) 2021 OpenStack Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from neutron_lib import constants + +# Special vlan_tci value indicating flat network +FLAT_VLAN_TCI = '0x0000/0x1fff' + +# Topic for tunnel notifications between the plugin and agent +TUNNEL = 'tunnel' + +# Name prefixes for veth device or patch port pair linking the integration +# bridge with the physical bridge for a physical network +PEER_INTEGRATION_PREFIX = 'int-' +PEER_PHYSICAL_PREFIX = 'phy-' + +# Nonexistent peer used to create patch ports without associating them, it +# allows to define flows before association +NONEXISTENT_PEER = 'nonexistent-peer' + +# The different types of tunnels +TUNNEL_NETWORK_TYPES = [ + constants.TYPE_GRE, + constants.TYPE_VXLAN, + constants.TYPE_GENEVE +] + +# --- OpenFlow table IDs + +# --- Integration bridge (int_br) + +LOCAL_SWITCHING = 0 + +# The pyhsical network types of support DVR router +DVR_PHYSICAL_NETWORK_TYPES = [constants.TYPE_VLAN, constants.TYPE_FLAT] + +# Various tables for DVR use of integration bridge flows +DVR_TO_SRC_MAC = 1 +DVR_TO_SRC_MAC_PHYSICAL = 2 +ARP_DVR_MAC_TO_DST_MAC = 3 +ARP_DVR_MAC_TO_DST_MAC_PHYSICAL = 4 +CANARY_TABLE = 23 + +# Table for ARP poison/spoofing prevention rules +ARP_SPOOF_TABLE = 24 + +# Table for MAC spoof filtering +MAC_SPOOF_TABLE = 25 + +# Table to decide whether further filtering is needed +TRANSIENT_TABLE = 60 +LOCAL_MAC_DIRECT = 61 +TRANSIENT_EGRESS_TABLE = 62 + +# Table for DHCP +DHCP_IPV4_TABLE = 77 +DHCP_IPV6_TABLE = 78 + +# Tables used for ovs firewall +BASE_EGRESS_TABLE = 71 +RULES_EGRESS_TABLE = 72 +ACCEPT_OR_INGRESS_TABLE = 73 +BASE_INGRESS_TABLE = 81 +RULES_INGRESS_TABLE = 82 + +OVS_FIREWALL_TABLES = ( + BASE_EGRESS_TABLE, + RULES_EGRESS_TABLE, + ACCEPT_OR_INGRESS_TABLE, + BASE_INGRESS_TABLE, + RULES_INGRESS_TABLE, +) + +# Tables for parties interacting with ovs firewall +ACCEPTED_EGRESS_TRAFFIC_TABLE = 91 +ACCEPTED_INGRESS_TRAFFIC_TABLE = 92 +DROPPED_TRAFFIC_TABLE = 93 +ACCEPTED_EGRESS_TRAFFIC_NORMAL_TABLE = 94 + +INT_BR_ALL_TABLES = ( + LOCAL_SWITCHING, + DVR_TO_SRC_MAC, + DVR_TO_SRC_MAC_PHYSICAL, + CANARY_TABLE, + ARP_SPOOF_TABLE, + MAC_SPOOF_TABLE, + LOCAL_MAC_DIRECT, + TRANSIENT_TABLE, + TRANSIENT_EGRESS_TABLE, + BASE_EGRESS_TABLE, + RULES_EGRESS_TABLE, + ACCEPT_OR_INGRESS_TABLE, + DHCP_IPV4_TABLE, + DHCP_IPV6_TABLE, + BASE_INGRESS_TABLE, + RULES_INGRESS_TABLE, + ACCEPTED_EGRESS_TRAFFIC_TABLE, + ACCEPTED_INGRESS_TRAFFIC_TABLE, + DROPPED_TRAFFIC_TABLE) + +# --- Tunnel bridge (tun_br) + +# Various tables for tunneling flows +DVR_PROCESS = 1 +PATCH_LV_TO_TUN = 2 +GRE_TUN_TO_LV = 3 +VXLAN_TUN_TO_LV = 4 +GENEVE_TUN_TO_LV = 6 + +DVR_NOT_LEARN = 9 +LEARN_FROM_TUN = 10 +UCAST_TO_TUN = 20 +ARP_RESPONDER = 21 +FLOOD_TO_TUN = 22 +# NOTE(vsaienko): transit table used by networking-bagpipe driver to +# mirror traffic to EVPN and standard tunnels to gateway nodes +BAGPIPE_FLOOD_TO_TUN_BROADCAST = 222 + +TUN_BR_ALL_TABLES = ( + LOCAL_SWITCHING, + DVR_PROCESS, + PATCH_LV_TO_TUN, + GRE_TUN_TO_LV, + VXLAN_TUN_TO_LV, + GENEVE_TUN_TO_LV, + DVR_NOT_LEARN, + LEARN_FROM_TUN, + UCAST_TO_TUN, + ARP_RESPONDER, + FLOOD_TO_TUN) + +# --- Physical Bridges (phys_brs) + +# Various tables for DVR use of physical bridge flows +DVR_PROCESS_PHYSICAL = 1 +LOCAL_VLAN_TRANSLATION = 2 +DVR_NOT_LEARN_PHYSICAL = 3 + +PHY_BR_ALL_TABLES = ( + LOCAL_SWITCHING, + DVR_PROCESS_PHYSICAL, + LOCAL_VLAN_TRANSLATION, + DVR_NOT_LEARN_PHYSICAL) + +# --- end of OpenFlow table IDs + +# type for ARP reply in ARP header +ARP_REPLY = '0x2' + +# Map tunnel types to tables number +TUN_TABLE = {constants.TYPE_GRE: GRE_TUN_TO_LV, + constants.TYPE_VXLAN: VXLAN_TUN_TO_LV, + constants.TYPE_GENEVE: GENEVE_TUN_TO_LV} + + +# The default respawn interval for the ovsdb monitor +DEFAULT_OVSDBMON_RESPAWN = 30 + +# Represent invalid OF Port +OFPORT_INVALID = -1 + +ARP_RESPONDER_ACTIONS = ('move:NXM_OF_ETH_SRC[]->NXM_OF_ETH_DST[],' + 'mod_dl_src:%(mac)s,' + 'load:0x2->NXM_OF_ARP_OP[],' + 'move:NXM_NX_ARP_SHA[]->NXM_NX_ARP_THA[],' + 'move:NXM_OF_ARP_SPA[]->NXM_OF_ARP_TPA[],' + 'load:%(mac)#x->NXM_NX_ARP_SHA[],' + 'load:%(ip)#x->NXM_OF_ARP_SPA[],' + 'in_port') + +# Represent ovs status +OVS_RESTARTED = 0 +OVS_NORMAL = 1 +OVS_DEAD = 2 + +EXTENSION_DRIVER_TYPE = 'ovs' + +# ovs datapath types +OVS_DATAPATH_SYSTEM = 'system' +OVS_DATAPATH_NETDEV = 'netdev' +OVS_DPDK_VHOST_USER = 'dpdkvhostuser' +OVS_DPDK_VHOST_USER_CLIENT = 'dpdkvhostuserclient' + +OVS_DPDK_PORT_TYPES = [OVS_DPDK_VHOST_USER, OVS_DPDK_VHOST_USER_CLIENT] + +# default ovs vhost-user socket location +VHOST_USER_SOCKET_DIR = '/var/run/openvswitch' + +MAX_DEVICE_RETRIES = 5 + +# OpenFlow version constants +OPENFLOW10 = "OpenFlow10" +OPENFLOW11 = "OpenFlow11" +OPENFLOW12 = "OpenFlow12" +OPENFLOW13 = "OpenFlow13" +OPENFLOW14 = "OpenFlow14" +OPENFLOW15 = "OpenFlow15" + +OPENFLOW_MAX_PRIORITY = 65535 + +# A placeholder for dead vlans. +DEAD_VLAN_TAG = constants.MAX_VLAN_TAG + 1 + +# callback resource for setting 'bridge_name' in the 'binding:vif_details' +OVS_BRIDGE_NAME = 'ovs_bridge_name' + +# callback resource for notifying to ovsdb handler +OVSDB_RESOURCE = 'ovsdb' + +# Used in ovs port 'external_ids' in order mark it for no cleanup when +# ovs_cleanup script is used. +SKIP_CLEANUP = 'skip_cleanup' diff -Nru python-neutron-lib-2.18.1/neutron_lib/tests/unit/api/definitions/test_qos_rule_type_filter.py python-neutron-lib-2.20.0/neutron_lib/tests/unit/api/definitions/test_qos_rule_type_filter.py --- python-neutron-lib-2.18.1/neutron_lib/tests/unit/api/definitions/test_qos_rule_type_filter.py 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/tests/unit/api/definitions/test_qos_rule_type_filter.py 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,25 @@ +# Copyright 2022 Red Hat, Inc. +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from neutron_lib.api.definitions import qos_rule_type_filter +from neutron_lib.tests.unit.api.definitions import base +from neutron_lib.tests.unit.api.definitions import test_qos + + +class QoSRuleTypeFilterTestCase(base.DefinitionBaseTestCase): + extension_module = qos_rule_type_filter + extension_resources = test_qos.QoSDefinitionTestCase.extension_resources + extension_attributes = (qos_rule_type_filter.QOS_RULE_TYPE_ALL_SUPPORTED, + qos_rule_type_filter.QOS_RULE_TYPE_ALL_RULES) diff -Nru python-neutron-lib-2.18.1/neutron_lib/tests/unit/api/definitions/test_taas.py python-neutron-lib-2.20.0/neutron_lib/tests/unit/api/definitions/test_taas.py --- python-neutron-lib-2.18.1/neutron_lib/tests/unit/api/definitions/test_taas.py 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/tests/unit/api/definitions/test_taas.py 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,23 @@ +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from neutron_lib.api.definitions import taas +from neutron_lib.tests.unit.api.definitions import base + + +class TaasDefinitionTestCase(base.DefinitionBaseTestCase): + extension_module = taas + extension_resources = (taas.COLLECTION_NAME, taas.TAP_FLOWS,) + extension_attributes = ('port_id', 'tap_service_id', 'source_port', + 'direction') diff -Nru python-neutron-lib-2.18.1/neutron_lib/tests/unit/api/definitions/test_vlan_filter.py python-neutron-lib-2.20.0/neutron_lib/tests/unit/api/definitions/test_vlan_filter.py --- python-neutron-lib-2.18.1/neutron_lib/tests/unit/api/definitions/test_vlan_filter.py 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/tests/unit/api/definitions/test_vlan_filter.py 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,23 @@ +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from neutron_lib.api.definitions import taas +from neutron_lib.api.definitions import vlan_filter +from neutron_lib.tests.unit.api.definitions import base + + +class TaasVlanFilterDefinitionTestCase(base.DefinitionBaseTestCase): + extension_module = vlan_filter + extension_resources = (taas.TAP_FLOWS,) + extension_attributes = ('vlan_filter',) diff -Nru python-neutron-lib-2.18.1/neutron_lib/tests/unit/api/test_conversions.py python-neutron-lib-2.20.0/neutron_lib/tests/unit/api/test_conversions.py --- python-neutron-lib-2.18.1/neutron_lib/tests/unit/api/test_conversions.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/tests/unit/api/test_conversions.py 2022-02-17 10:28:33.000000000 +0000 @@ -177,23 +177,23 @@ def test_convert_ipv6_address_extended_add_with_zeroes(self): result = converters.convert_ip_to_canonical_format( - u'2001:0db8:0:0:0:0:0:0001') - self.assertEqual(u'2001:db8::1', result) + '2001:0db8:0:0:0:0:0:0001') + self.assertEqual('2001:db8::1', result) @testtools.skipIf(tools.is_bsd(), 'bug/1484837') def test_convert_ipv6_compressed_address_OSX_skip(self): result = converters.convert_ip_to_canonical_format( - u'2001:db8:0:1:1:1:1:1') - self.assertEqual(u'2001:db8:0:1:1:1:1:1', result) + '2001:db8:0:1:1:1:1:1') + self.assertEqual('2001:db8:0:1:1:1:1:1', result) def test_convert_ipv6_extended_addr_to_compressed(self): result = converters.convert_ip_to_canonical_format( u"Fe80:0:0:0:0:0:0:1") - self.assertEqual(u'fe80::1', result) + self.assertEqual('fe80::1', result) def test_convert_ipv4_address(self): result = converters.convert_ip_to_canonical_format(u"192.168.1.1") - self.assertEqual(u'192.168.1.1', result) + self.assertEqual('192.168.1.1', result) def test_convert_None_address(self): result = converters.convert_ip_to_canonical_format(None) @@ -203,28 +203,28 @@ result = converters.convert_ip_to_canonical_format("on") self.assertEqual("on", result) result = converters.convert_ip_to_canonical_format( - u'192.168.1.1/32') - self.assertEqual(u'192.168.1.1/32', result) + '192.168.1.1/32') + self.assertEqual('192.168.1.1/32', result) result = converters.convert_ip_to_canonical_format( - u'2001:db8:0:1:1:1:1:1/128') - self.assertEqual(u'2001:db8:0:1:1:1:1:1/128', result) + '2001:db8:0:1:1:1:1:1/128') + self.assertEqual('2001:db8:0:1:1:1:1:1/128', result) class TestConvertIPv6CIDRCanonicalFormat(base.BaseTestCase): def test_convert_ipv4_address_with_CIDR(self): - result = converters.convert_cidr_to_canonical_format(u'192.168.1.1/24') - self.assertEqual(u'192.168.1.1/24', result) + result = converters.convert_cidr_to_canonical_format('192.168.1.1/24') + self.assertEqual('192.168.1.1/24', result) def test_convert_ipv6_extended_addr_withcidr_to_compressed(self): result = converters.convert_cidr_to_canonical_format( - u'Fe80:0:0:0:0:0:0:1/64') - self.assertEqual(u'fe80::1/64', result) + 'Fe80:0:0:0:0:0:0:1/64') + self.assertEqual('fe80::1/64', result) def test_convert_non_ip_addr_with_slash(self): with testtools.ExpectedException(n_exc.InvalidInput): converters.convert_cidr_to_canonical_format( - u"Dormamu/DarkSeid/Vulture") + "Dormamu/DarkSeid/Vulture") class TestConvertStringToCaseInsensitive(base.BaseTestCase): diff -Nru python-neutron-lib-2.18.1/neutron_lib/tests/unit/api/validators/test_validators.py python-neutron-lib-2.20.0/neutron_lib/tests/unit/api/validators/test_validators.py --- python-neutron-lib-2.18.1/neutron_lib/tests/unit/api/validators/test_validators.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/tests/unit/api/validators/test_validators.py 2022-02-17 10:28:33.000000000 +0000 @@ -971,6 +971,24 @@ msg = validators._validate_list_of_items_non_empty(mock.Mock(), items) self.assertEqual("List should not be empty", msg) + def test__validate_list_of_items_collect_duplicates(self): + items = ['a', 'b', 'duplicate_1', 'duplicate_2', 'duplicate_1', + 'duplicate_2', 'duplicate_2', 'c'] + msg = validators._validate_list_of_items(mock.Mock(), items) + error = ("Duplicate items in the list: '%s'" + % 'duplicate_1, duplicate_2') + self.assertEqual(error, msg) + + items = [['a', 'b'], ['c', 'd'], ['a', 'b']] + msg = validators._validate_list_of_items(mock.Mock(), items) + error = "Duplicate items in the list: '%s'" % ['a', 'b'] + self.assertEqual(error, msg) + + items = [{'a': 'b'}, {'c': 'd'}, {'a': 'b'}] + msg = validators._validate_list_of_items(mock.Mock(), items) + error = "Duplicate items in the list: '%s'" % {'a': 'b'} + self.assertEqual(error, msg) + def test_validate_dict_type(self): for value in (None, True, '1', []): self.assertEqual("'%s' is not a dictionary" % value, diff -Nru python-neutron-lib-2.18.1/neutron_lib/tests/unit/db/test_api.py python-neutron-lib-2.20.0/neutron_lib/tests/unit/db/test_api.py --- python-neutron-lib-2.18.1/neutron_lib/tests/unit/db/test_api.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/tests/unit/db/test_api.py 2022-02-17 10:28:33.000000000 +0000 @@ -106,7 +106,7 @@ retry_fixture.cleanUp() def test_mysql_savepoint_error(self): - e = db_exc.DBError("(pymysql.err.InternalError) (1305, u'SAVEPOINT " + e = db_exc.DBError("(pymysql.err.InternalError) (1305, 'SAVEPOINT " "sa_savepoint_1 does not exist')") self.assertIsNone(self._decorated_function(1, e)) diff -Nru python-neutron-lib-2.18.1/neutron_lib/tests/unit/placement/test_utils.py python-neutron-lib-2.20.0/neutron_lib/tests/unit/placement/test_utils.py --- python-neutron-lib-2.18.1/neutron_lib/tests/unit/placement/test_utils.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib/tests/unit/placement/test_utils.py 2022-02-17 10:28:33.000000000 +0000 @@ -51,7 +51,7 @@ # assertNotRaises place_utils.six_uuid5( namespace=self._uuid_ns, - name=u'unicode string') + name='unicode string') except Exception: self.fail('could not generate uuid') diff -Nru python-neutron-lib-2.18.1/neutron_lib.egg-info/pbr.json python-neutron-lib-2.20.0/neutron_lib.egg-info/pbr.json --- python-neutron-lib-2.18.1/neutron_lib.egg-info/pbr.json 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib.egg-info/pbr.json 2022-02-17 10:29:11.000000000 +0000 @@ -0,0 +1 @@ +{"git_version": "6dfa4f5", "is_release": true} \ No newline at end of file diff -Nru python-neutron-lib-2.18.1/neutron_lib.egg-info/PKG-INFO python-neutron-lib-2.20.0/neutron_lib.egg-info/PKG-INFO --- python-neutron-lib-2.18.1/neutron_lib.egg-info/PKG-INFO 2022-01-05 15:42:10.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib.egg-info/PKG-INFO 2022-02-17 10:29:11.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: neutron-lib -Version: 2.18.1 +Version: 2.20.0 Summary: Neutron shared routines and utilities Home-page: https://docs.openstack.org/neutron-lib/latest/ Author: OpenStack diff -Nru python-neutron-lib-2.18.1/neutron_lib.egg-info/SOURCES.txt python-neutron-lib-2.20.0/neutron_lib.egg-info/SOURCES.txt --- python-neutron-lib-2.18.1/neutron_lib.egg-info/SOURCES.txt 2022-01-05 15:42:10.000000000 +0000 +++ python-neutron-lib-2.20.0/neutron_lib.egg-info/SOURCES.txt 2022-02-17 10:29:11.000000000 +0000 @@ -57,6 +57,7 @@ api-ref/source/v2/quotas.inc api-ref/source/v2/rbac-policy.inc api-ref/source/v2/router-interface-fip.inc +api-ref/source/v2/router-ndp-proxy.inc api-ref/source/v2/routers.inc api-ref/source/v2/security-group-rules.inc api-ref/source/v2/security-groups.inc @@ -65,6 +66,7 @@ api-ref/source/v2/subnetpool_prefix_ops.inc api-ref/source/v2/subnetpools.inc api-ref/source/v2/subnets.inc +api-ref/source/v2/taas.inc api-ref/source/v2/tags.inc api-ref/source/v2/trunk-details.inc api-ref/source/v2/trunk.inc @@ -276,6 +278,12 @@ api-ref/source/v2/samples/metering/metering-label-show-response.json api-ref/source/v2/samples/metering/metering-labels-list-request-json-http.txt api-ref/source/v2/samples/metering/metering-labels-list-response.json +api-ref/source/v2/samples/ndp_proxies/ndp-proxies-list-response.json +api-ref/source/v2/samples/ndp_proxies/ndp-proxy-create-request.json +api-ref/source/v2/samples/ndp_proxies/ndp-proxy-create-response.json +api-ref/source/v2/samples/ndp_proxies/ndp-proxy-show-response.json +api-ref/source/v2/samples/ndp_proxies/ndp-proxy-update-request.json +api-ref/source/v2/samples/ndp_proxies/ndp-proxy-update-response.json api-ref/source/v2/samples/network-ip-availability/network-ip-availability-list.json api-ref/source/v2/samples/network-ip-availability/network-ip-availability-show.json api-ref/source/v2/samples/network_segment_ranges/network_segment_range-create-request.json @@ -437,6 +445,18 @@ api-ref/source/v2/samples/subnets/subnets-create-bulk-request.json api-ref/source/v2/samples/subnets/subnets-create-bulk-response.json api-ref/source/v2/samples/subnets/subnets-list-response.json +api-ref/source/v2/samples/taas/taf-create-request.json +api-ref/source/v2/samples/taas/taf-create-response.json +api-ref/source/v2/samples/taas/taf-list-response.json +api-ref/source/v2/samples/taas/taf-show-response.json +api-ref/source/v2/samples/taas/taf-update-request.json +api-ref/source/v2/samples/taas/taf-update-response.json +api-ref/source/v2/samples/taas/tas-create-request.json +api-ref/source/v2/samples/taas/tas-create-response.json +api-ref/source/v2/samples/taas/tas-list-response.json +api-ref/source/v2/samples/taas/tas-show-response.json +api-ref/source/v2/samples/taas/tas-update-request.json +api-ref/source/v2/samples/taas/tas-update-response.json api-ref/source/v2/samples/tag/tag-obtain-response.json api-ref/source/v2/samples/tag/tag-update-request.json api-ref/source/v2/samples/tag/tag-update-response.json @@ -516,6 +536,7 @@ neutron_lib.egg-info/dependency_links.txt neutron_lib.egg-info/entry_points.txt neutron_lib.egg-info/not-zip-safe +neutron_lib.egg-info/pbr.json neutron_lib.egg-info/requires.txt neutron_lib.egg-info/top_level.txt neutron_lib/agent/__init__.py @@ -632,6 +653,7 @@ neutron_lib/api/definitions/qos_pps_minimum_rule_alias.py neutron_lib/api/definitions/qos_pps_rule.py neutron_lib/api/definitions/qos_rule_type_details.py +neutron_lib/api/definitions/qos_rule_type_filter.py neutron_lib/api/definitions/qos_rules_alias.py neutron_lib/api/definitions/quota_check_limit.py neutron_lib/api/definitions/rbac_address_groups.py @@ -664,10 +686,12 @@ neutron_lib/api/definitions/subnet_service_types.py neutron_lib/api/definitions/subnetpool.py neutron_lib/api/definitions/subnetpool_prefix_ops.py +neutron_lib/api/definitions/taas.py neutron_lib/api/definitions/tag_ports_during_bulk_creation.py neutron_lib/api/definitions/trunk.py neutron_lib/api/definitions/trunk_details.py neutron_lib/api/definitions/uplink_status_propagation.py +neutron_lib/api/definitions/vlan_filter.py neutron_lib/api/definitions/vlantransparent.py neutron_lib/api/definitions/vpn.py neutron_lib/api/definitions/vpn_endpoint_groups.py @@ -717,6 +741,7 @@ neutron_lib/exceptions/placement.py neutron_lib/exceptions/port_security.py neutron_lib/exceptions/qos.py +neutron_lib/exceptions/taas.py neutron_lib/exceptions/vlantransparent.py neutron_lib/exceptions/vpn.py neutron_lib/hacking/__init__.py @@ -742,6 +767,7 @@ neutron_lib/plugins/utils.py neutron_lib/plugins/ml2/__init__.py neutron_lib/plugins/ml2/api.py +neutron_lib/plugins/ml2/ovs_constants.py neutron_lib/policy/__init__.py neutron_lib/policy/_engine.py neutron_lib/services/__init__.py @@ -873,6 +899,7 @@ neutron_lib/tests/unit/api/definitions/test_qos_pps_minimum_rule_alias.py neutron_lib/tests/unit/api/definitions/test_qos_pps_rule.py neutron_lib/tests/unit/api/definitions/test_qos_rule_type_details.py +neutron_lib/tests/unit/api/definitions/test_qos_rule_type_filter.py neutron_lib/tests/unit/api/definitions/test_qos_rules_alias.py neutron_lib/tests/unit/api/definitions/test_quota_check_limit.py neutron_lib/tests/unit/api/definitions/test_rbac_address_groups.py @@ -904,10 +931,12 @@ neutron_lib/tests/unit/api/definitions/test_subnet_service_types.py neutron_lib/tests/unit/api/definitions/test_subnetpool.py neutron_lib/tests/unit/api/definitions/test_subnetpool_prefix_ops.py +neutron_lib/tests/unit/api/definitions/test_taas.py neutron_lib/tests/unit/api/definitions/test_tag_ports_during_bulk_creation.py neutron_lib/tests/unit/api/definitions/test_trunk.py neutron_lib/tests/unit/api/definitions/test_trunk_details.py neutron_lib/tests/unit/api/definitions/test_uplink_status_propagation.py +neutron_lib/tests/unit/api/definitions/test_vlan_filter.py neutron_lib/tests/unit/api/definitions/test_vlantransparent.py neutron_lib/tests/unit/api/definitions/test_vpn.py neutron_lib/tests/unit/api/definitions/test_vpn_endpoint_groups.py @@ -976,6 +1005,7 @@ releasenotes/notes/Add-oneline-string-validator-aa4e1ccad9d8d5c8.yaml releasenotes/notes/Adds-PORT_FORWARDING_FLOATINGIP_KEY-ee2c7d164bea04b4.yaml releasenotes/notes/Move-RBAC-share-actions-to-lib-constants-736d881f127c83d7.yaml +releasenotes/notes/Rehome-ovs-constants-to-separate-module-07ce93971dd1d7dc.yaml releasenotes/notes/add-a-getter-for-a-newly-added-option-2082877bf7dd136b.yaml releasenotes/notes/add-action-status-3dbfe2490a0d231a.yaml releasenotes/notes/add-api-extension-sort-key-validation-b42f5839671fe5f5.yaml @@ -1050,6 +1080,7 @@ releasenotes/notes/boilerplate-ext-descriptor-a5cec8b9b900cbfd.yaml releasenotes/notes/bug-1877254-2b997b3911e98079.yaml releasenotes/notes/bug-1921150-a38bef3c1be69650.yaml +releasenotes/notes/bug-1957175-6b2705d4772df7de.yaml releasenotes/notes/callback_priority-2ded960e17bd5db9.yaml releasenotes/notes/change_placement_client_method_names_b26bb71425f42db3.yaml releasenotes/notes/cidr_for_canonical_format-4e7925d76a27a19d.yaml @@ -1082,6 +1113,7 @@ releasenotes/notes/extraroute-atomic-apidef-80a7c6d4a773c701.yaml releasenotes/notes/extraroute-atomic-apidef-additive-fb783d66c08618d4.yaml releasenotes/notes/fip64-0c6bb38417d602f1.yaml +releasenotes/notes/fix-api-list-validation-collect-duplicates-f4d45bf5d5abbdff.yaml releasenotes/notes/fix-warnfixture-c9457c50d0d5c5a7.yaml releasenotes/notes/floatingip-autodelete-internal-dep-8e544fad694d1275.yaml releasenotes/notes/floatingip-autodelete-internal-f08675d8d64d34c6.yaml @@ -1112,6 +1144,7 @@ releasenotes/notes/logging-resource-api-cecf33e3be468eb2.yaml releasenotes/notes/mac-generator-f927df2fe57300c0.yaml releasenotes/notes/mechanism_driver_supported_extensions-67e1b0b763571ae9.yaml +releasenotes/notes/mechanismdriver-connectivity-00dc679a3f307345.yaml releasenotes/notes/migrate-public-to-shared-0c67b32f9c37c751.yaml releasenotes/notes/move-get-random-mac-98f47d81cb34483d.yaml releasenotes/notes/move-segment-range-types-to-lib-constants-d45c6959607e9136.yaml @@ -1158,8 +1191,10 @@ releasenotes/notes/qos-port-network-policy-c64c57cf2ccec725.yaml releasenotes/notes/qos-pps-minimum-1f9a5433d7d4fecd.yaml releasenotes/notes/qos-pps-minimum-rule-alias-2d0e711bde2aa1e8.yaml +releasenotes/notes/qos-rule-type-filter-dbac0ec80ce342f3.yaml releasenotes/notes/qos-rules-alias-ext-c13417dcb3d81130.yaml releasenotes/notes/qos-rules-alias-ext-fix-3f3f7dd21837cfec.yaml +releasenotes/notes/quota-driver-api-get-workers-f540a81235dbf48d.yaml releasenotes/notes/rehome-address-scope-apidef-f4e8bb74be61729a.yaml releasenotes/notes/rehome-agent-apidef-7a2dde6a9810f55c.yaml releasenotes/notes/rehome-allowedaddrpairs-apidef-cd342b9a57a2dfdf.yaml @@ -1245,6 +1280,7 @@ releasenotes/notes/rehome-unstable-test-decorator-a062301ac7d7a082.yaml releasenotes/notes/rehome-vlantransp-apidef-1cd7d3ace9042686.yaml releasenotes/notes/rehome-worker-b7e9c7f477bdb926.yaml +releasenotes/notes/rehome_taas_apidef-5fb00d84da32b958.yaml releasenotes/notes/remove-ensure_dir-aed59b616e02a2bb.yaml releasenotes/notes/remove-hacking-check-n523-014d163a5ae23adb.yaml releasenotes/notes/remove-neutron-interconnection-api-definition-4ff88c583f2fe47b.yaml @@ -1285,6 +1321,7 @@ releasenotes/notes/validator_ip_or_subnet_or_none-0175f906a9113954.yaml releasenotes/notes/vhost-vdpa-cc35f8d0ff9b3c4a.yaml releasenotes/notes/vnic-accelerator-eaf9b583d60e76ce.yaml +releasenotes/notes/vnic-type-remote-managed-c0809926fcd30e93.yaml releasenotes/notes/vnic-type-smart-nic-45dd5a22a9d1aa63.yaml releasenotes/notes/vpn-api-def-52970461fac0f7d2.yaml releasenotes/source/README.rst diff -Nru python-neutron-lib-2.18.1/PKG-INFO python-neutron-lib-2.20.0/PKG-INFO --- python-neutron-lib-2.18.1/PKG-INFO 2022-01-05 15:42:11.067654000 +0000 +++ python-neutron-lib-2.20.0/PKG-INFO 2022-02-17 10:29:12.042426300 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: neutron-lib -Version: 2.18.1 +Version: 2.20.0 Summary: Neutron shared routines and utilities Home-page: https://docs.openstack.org/neutron-lib/latest/ Author: OpenStack diff -Nru python-neutron-lib-2.18.1/releasenotes/notes/bug-1957175-6b2705d4772df7de.yaml python-neutron-lib-2.20.0/releasenotes/notes/bug-1957175-6b2705d4772df7de.yaml --- python-neutron-lib-2.18.1/releasenotes/notes/bug-1957175-6b2705d4772df7de.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/releasenotes/notes/bug-1957175-6b2705d4772df7de.yaml 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,7 @@ +--- +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 `_. diff -Nru python-neutron-lib-2.18.1/releasenotes/notes/fix-api-list-validation-collect-duplicates-f4d45bf5d5abbdff.yaml python-neutron-lib-2.20.0/releasenotes/notes/fix-api-list-validation-collect-duplicates-f4d45bf5d5abbdff.yaml --- python-neutron-lib-2.18.1/releasenotes/notes/fix-api-list-validation-collect-duplicates-f4d45bf5d5abbdff.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/releasenotes/notes/fix-api-list-validation-collect-duplicates-f4d45bf5d5abbdff.yaml 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,8 @@ +--- +fixes: + - | + Fixed an issue where API validation for duplicate entries in list values + would fail with a TypeError in case the values in the list was of type + ``dict``. + See bug: `1956785 `_. + diff -Nru python-neutron-lib-2.18.1/releasenotes/notes/mechanismdriver-connectivity-00dc679a3f307345.yaml python-neutron-lib-2.20.0/releasenotes/notes/mechanismdriver-connectivity-00dc679a3f307345.yaml --- python-neutron-lib-2.18.1/releasenotes/notes/mechanismdriver-connectivity-00dc679a3f307345.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/releasenotes/notes/mechanismdriver-connectivity-00dc679a3f307345.yaml 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,6 @@ +--- +features: + - | + Add ``connectivity`` property to ``MechanismDriver``. For more information, + see + [`Boot a VM with an unaddressed port `_]. diff -Nru python-neutron-lib-2.18.1/releasenotes/notes/qos-rule-type-filter-dbac0ec80ce342f3.yaml python-neutron-lib-2.20.0/releasenotes/notes/qos-rule-type-filter-dbac0ec80ce342f3.yaml --- python-neutron-lib-2.18.1/releasenotes/notes/qos-rule-type-filter-dbac0ec80ce342f3.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/releasenotes/notes/qos-rule-type-filter-dbac0ec80ce342f3.yaml 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,8 @@ +--- +features: + - | + Added API definition for ``qos-rule-type-filter`` extension that adds two + new parameters to QoS rule type API: "all_supported" that is a flag to + filter all supported QoS rule types by at least one loaded mechanism + driver; "all_rules" that is a flag to filter all implemented QoS rule + types in the Neutron server. diff -Nru python-neutron-lib-2.18.1/releasenotes/notes/quota-driver-api-get-workers-f540a81235dbf48d.yaml python-neutron-lib-2.20.0/releasenotes/notes/quota-driver-api-get-workers-f540a81235dbf48d.yaml --- python-neutron-lib-2.18.1/releasenotes/notes/quota-driver-api-get-workers-f540a81235dbf48d.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/releasenotes/notes/quota-driver-api-get-workers-f540a81235dbf48d.yaml 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,6 @@ +--- +other: + - | + Added abstract method ``get_workers`` to ``QuotaDriverAPI`` metaclass. This + method returns the quota driver workers that needs to be spawned during the + plugin initialization. diff -Nru python-neutron-lib-2.18.1/releasenotes/notes/Rehome-ovs-constants-to-separate-module-07ce93971dd1d7dc.yaml python-neutron-lib-2.20.0/releasenotes/notes/Rehome-ovs-constants-to-separate-module-07ce93971dd1d7dc.yaml --- python-neutron-lib-2.18.1/releasenotes/notes/Rehome-ovs-constants-to-separate-module-07ce93971dd1d7dc.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/releasenotes/notes/Rehome-ovs-constants-to-separate-module-07ce93971dd1d7dc.yaml 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,6 @@ +--- +other: + - | + Openvswitch related constants are moved from the + ``neutron_lib.constants`` module to the own module + ``neutron_lib.plugins.ml2.ovs_constants``. diff -Nru python-neutron-lib-2.18.1/releasenotes/notes/rehome_taas_apidef-5fb00d84da32b958.yaml python-neutron-lib-2.20.0/releasenotes/notes/rehome_taas_apidef-5fb00d84da32b958.yaml --- python-neutron-lib-2.18.1/releasenotes/notes/rehome_taas_apidef-5fb00d84da32b958.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/releasenotes/notes/rehome_taas_apidef-5fb00d84da32b958.yaml 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,6 @@ +--- +features: + - The API definitions of ``tap-as-a-service``, ``taas`` and ``vlan_filter``, + are now available in ``neutron_lib.api.definitions``. + This includes ``tap_services``, ``tap_flows`` and ``vlan_filter`` + extension to tap_flows. diff -Nru python-neutron-lib-2.18.1/releasenotes/notes/vnic-type-remote-managed-c0809926fcd30e93.yaml python-neutron-lib-2.20.0/releasenotes/notes/vnic-type-remote-managed-c0809926fcd30e93.yaml --- python-neutron-lib-2.18.1/releasenotes/notes/vnic-type-remote-managed-c0809926fcd30e93.yaml 1970-01-01 00:00:00.000000000 +0000 +++ python-neutron-lib-2.20.0/releasenotes/notes/vnic-type-remote-managed-c0809926fcd30e93.yaml 2022-02-17 10:28:33.000000000 +0000 @@ -0,0 +1,5 @@ +--- +features: + - | + Add ``remote-managed`` VNIC type for ports such as off-path SmartNIC DPU + ports. diff -Nru python-neutron-lib-2.18.1/releasenotes/source/conf.py python-neutron-lib-2.20.0/releasenotes/source/conf.py --- python-neutron-lib-2.18.1/releasenotes/source/conf.py 2022-01-05 15:41:33.000000000 +0000 +++ python-neutron-lib-2.20.0/releasenotes/source/conf.py 2022-02-17 10:28:33.000000000 +0000 @@ -54,8 +54,8 @@ master_doc = 'index' # General information about the project. -project = u'Neutron Library Release Notes' -copyright = u'2016, Neutron Library Developers' +project = 'Neutron Library Release Notes' +copyright = '2016, Neutron Library Developers' # Release notes are version independent. # The full version, including alpha/beta/rc tags. @@ -201,8 +201,8 @@ # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'NeutronLibReleaseNotes.tex', - u'Neutron Library Notes Documentation', - u'Neutron Library Developers', 'manual'), + 'Neutron Library Notes Documentation', + 'Neutron Library Developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -231,9 +231,9 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'neutronlibreleasenotes', u'Neutron Library', + ('index', 'neutronlibreleasenotes', 'Neutron Library', 'Neutron Library Release Notes Documentation', - [u'Neutron Library Developers'], + ['Neutron Library Developers'], 1) ] @@ -247,9 +247,9 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'NeutronLibReleaseNotes', u'Neutron Library', + ('index', 'NeutronLibReleaseNotes', 'Neutron Library', 'Neutron Library Release Notes Documentation', - u'Neutron Library Developers', + 'Neutron Library Developers', 'NeutronLibReleaseNotes', 'For sharing/decoupling neutron functionality across the Stadium.', 'Miscellaneous'),