Skip to content

Deprecate the use of TenantID field across various resources #3736

Description

@winiciusallan

During the change from Identity V2 to Identity V3, the concept of tenants was deprecated[1], and OpenStack is now using the project concept.

At this time, we still support API requests using the TenantID field across various projects. We need to find the occurrences we can change to ProjectID instead (or something like that).

One example is to change this field name in VolumeSnapshots.

❯ grep -rn "Tenant" openstack/**/requests.go
openstack/blockstorage/noauth/requests.go:23:	if options.TenantName == "" {
openstack/blockstorage/noauth/requests.go:24:		options.TenantName = "admin"
openstack/blockstorage/noauth/requests.go:28:		TokenID: fmt.Sprintf("%s:%s", options.Username, options.TenantName),
openstack/blockstorage/v2/backups/requests.go:95:	// AllTenants will retrieve backups of all tenants/projects.
openstack/blockstorage/v2/backups/requests.go:96:	AllTenants bool `q:"all_tenants"`
openstack/blockstorage/v2/backups/requests.go:106:	// TenantID will filter by a specific tenant/project ID.
openstack/blockstorage/v2/backups/requests.go:107:	// Setting AllTenants is required to use this.
openstack/blockstorage/v2/backups/requests.go:108:	TenantID string `q:"project_id"`
openstack/blockstorage/v2/backups/requests.go:157:	// AllTenants will retrieve backups of all tenants/projects.
openstack/blockstorage/v2/backups/requests.go:158:	AllTenants bool `q:"all_tenants"`
openstack/blockstorage/v2/quotasets/requests.go:73:// Options for Updating the quotas of a Tenant.
.
.
.

This will be a breaking change and is intended to be done in Gophercloud V3.

[1] https://docs.openstack.org/api-ref/identity/v3/index.html#what-s-new-in-version-3-0-grizzly

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions