openstackclient: add module (#4530)

Co-authored-by: Sumner Evans <me@sumnerevans.com>
This commit is contained in:
Nicola Squartini 2023-11-15 23:25:44 +01:00 committed by GitHub
parent 280721186a
commit ab1459a1fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 136 additions and 1 deletions

View file

@ -0,0 +1,35 @@
{ ... }:
{
programs.openstackclient = {
enable = true;
clouds = {
my-infra = {
cloud = "example-cloud";
auth = {
project_id = "0123456789abcdef0123456789abcdef";
username = "openstack";
};
region_name = "XXX";
interface = "internal";
};
};
publicClouds = {
example-cloud = {
auth = { auth_url = "https://identity.cloud.example.com/v2.0"; };
};
};
};
test.stubs.openstackclient = { };
nmt.script = ''
assertFileExists home-files/.config/openstack/clouds.yaml
assertFileContent home-files/.config/openstack/clouds.yaml \
${./clouds.yaml}
assertFileExists home-files/.config/openstack/clouds-public.yaml
assertFileContent home-files/.config/openstack/clouds-public.yaml \
${./clouds-public.yaml}
'';
}