networkextensions

package
v0.0.0-...-c53fdc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(networkClient *gophercloud.ServiceClient) ([]extensions.Extension, error)

Get returns a slice of the extensions available in the Neutron instance targeted by networkClient, or a non-nil error.

func Validate

func Validate(availableExtensions []extensions.Extension) error

Validate returns a non-nil error if the available extensions do not match the Installer requirements.

Network resource tagging is a bit complex with OpenStack:

  • up until OpenStack Ocata / OSP 11, there were two extensions for tagging neutron resources, `tag` for network only and `tag-ext` for subnet, subnetpool, port, and router.
  • OpenStack Pike / OSP 12 introduced the `standard-attr-tag` extension for trunk, policy, security_group, and floatingip.
  • with OpenStack Rocky / OSP 14, everything went under the `standard-attr-tag` extension.

We need to check that:

  1. `standard-attr-tag` extension is enabled
  2. `standard-attr-tag` covers all the necessary resources (from the extension description) or that the `tag` and `tag-ext` extensions are enabled as well

Types

type Error

type Error string

Error is the error type for this package, ready to be unwrapped with `errors.As`.

const (
	// ErrMissingStandardAttrTag is returned when standard-attr-tag is not found in the cloud
	ErrMissingStandardAttrTag Error = "openstack platform does not have the required standard-attr-tag network extension"

	// ErrInvalidStandardAttrTag is returned when standard-attr-tag is too old and missing the required tag and tag-ext extensions
	ErrInvalidStandardAttrTag Error = "openstack platform's neutron extension standard-attr-tag is too old and missing the required tag and tag-ext extensions"
)

func (Error) Error

func (err Error) Error() string

Error implements the error interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL