From 5faa434c5f33355a116119aad1445fa3a3633e7f Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Tue, 22 Dec 2020 16:02:08 +0100 Subject: [PATCH] Allow access to more clouds files There are more options to specify a clouds.yaml file: a) the file can end with .yml, .yaml or .json b) the file can be located in the user home dir or in /etc/openstack So allow read-only access to /etc/openstack and ~/.config/openstack/ . See https://opendev.org/openstack/openstacksdk/src/branch/master/openstack/config/loader.py#L49 Change-Id: I84276ff4b12acc5f4ac5092580bb0e652d518e54 (cherry picked from commit 528db56bbcd0bd57916ae97b1cfc3d6f548b721a) --- snapcraft.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index b760e7c..07171c6 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -17,10 +17,14 @@ grade: stable base: core18 plugs: - dot-config-openstack-clouds-yaml: + dot-config-openstack: interface: personal-files read: - - $HOME/.config/openstack/clouds.yaml + - $HOME/.config/openstack + etc-openstack: + interface: system-files + read: + - /etc/openstack apps: openstack: @@ -29,7 +33,8 @@ apps: plugs: - network - home - - dot-config-openstack-clouds-yaml + - dot-config-openstack + - etc-openstack - ssh-public-keys glance: command: bin/glance