Skip to content

Commit

Permalink
add oslo_limit config
Browse files Browse the repository at this point in the history
This change add supprot for configuring the [oslo_limit] section.
oslo.limit is used by the optional unifed limits quota driver.

This change relys on the automic endpoint discovery intoduced in
oslo.limit 2.6.0

Related: OSPRH-9518
  • Loading branch information
SeanMooney committed Feb 4, 2025
1 parent 70784bb commit 94af7e2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions templates/nova.conf
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,16 @@ project_name = service
username = {{ .nova_keystone_user }}
password = {{ .nova_keystone_password }}

[oslo_limit]
system_scope = all
endpoint_interface = internal
endpoint_service_type = compute
auth_url = {{ .keystone_internal_url }}
auth_type = password
user_domain_name = {{ .default_user_domain}}
username = {{ .nova_keystone_user }}
password = {{ .nova_keystone_password }}

{{ if (index . "compute_driver") }}
{{if eq .compute_driver "ironic.IronicDriver"}}
[ironic]
Expand Down
8 changes: 8 additions & 0 deletions test/functional/novaapi_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,14 @@ var _ = Describe("NovaAPI controller", func() {
Expect(configData).Should(ContainSubstring("enforce_new_defaults=true"))
Expect(configData).Should(ContainSubstring("enforce_scope=true"))
Expect(configData).Should(ContainSubstring("policy_file=/etc/nova/policy.yaml"))
// need for inital quota check when using unifed limits
// im using a multi line sting literal so it must be dedented to avoid including
// the tabs in the assert
Expect(configData).Should(
ContainSubstring(`[oslo_limit]
system_scope = all
endpoint_interface = internal
endpoint_service_type = compute`))
// test config override
Expect(configDataMap.Data).Should(HaveKey("02-nova-override.conf"))
extraData := string(configDataMap.Data["02-nova-override.conf"])
Expand Down

0 comments on commit 94af7e2

Please sign in to comment.