snap-openstackclients/snapcraft.yaml
Thomas Bechtold 2f48861d20 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)
2021-05-17 09:33:58 +01:00

208 lines
4.4 KiB
YAML

name: openstackclients
version: rocky
summary: OpenStack Client tools
description: |
OpenStackClient (aka OSC) is a command-line client for OpenStack
that brings the command set for Compute, Identity, Image, Object
Store and Block Storage APIs together in a single shell with a
uniform command structure.
.
The primary goal is to provide a unified shell command structure
and a common language to describe operations in OpenStack.
.
This snap provides the openstack command-line client and other
project specific command-line clients.
confinement: strict
grade: stable
base: core18
plugs:
dot-config-openstack:
interface: personal-files
read:
- $HOME/.config/openstack
etc-openstack:
interface: system-files
read:
- /etc/openstack
apps:
openstack:
command: bin/openstack
completer: usr/share/bash-completion/completions/openstack
plugs:
- network
- home
- dot-config-openstack
- etc-openstack
- ssh-public-keys
glance:
command: bin/glance
plugs:
- network
- home
gnocchi:
command: bin/gnocchi
plugs:
- network
- home
neutron:
command: bin/neutron
plugs:
- network
- home
nova:
command: bin/nova
plugs:
- network
- home
- ssh-public-keys
cinder:
command: bin/cinder
plugs:
- network
- home
aodh:
command: bin/aodh
plugs:
- network
- home
barbican:
command: bin/barbican
plugs:
- network
- home
ceilometer:
command: bin/ceilometer
plugs:
- network
- home
cloudkitty:
command: bin/cloudkitty
plugs:
- network
- home
freezer:
command: bin/freezer
plugs:
- network
- home
glance:
command: bin/glance
plugs:
- network
- home
heat:
command: bin/heat
plugs:
- network
- home
magnum:
command: bin/magnum
plugs:
- network
- home
manila:
command: bin/manila
plugs:
- network
- home
masakari:
command: bin/masakari
plugs:
- network
- home
mistral:
command: bin/mistral
plugs:
- network
- home
monasca:
command: bin/monasca
plugs:
- network
- home
murano:
command: bin/murano
plugs:
- network
- home
swift:
command: bin/swift
plugs:
- network
- home
tacker:
command: bin/tacker
plugs:
- network
- home
trove:
command: bin/trove
plugs:
- network
- home
watcher:
command: bin/watcher
plugs:
- network
- home
parts:
openstackclients:
plugin: python
python-version: python3
python-packages:
- aodhclient
- osc-placement
- python-barbicanclient
- python-ceilometerclient
- python-cloudkittyclient
- python-congressclient
- python-designateclient
- python-freezerclient
- python-glanceclient
- python-heatclient
- python-ironicclient
- python-keystoneclient
- python-magnumclient
- python-manilaclient
- python-masakariclient
- python-mistralclient
- python-monascaclient
- python-muranoclient
- python-saharaclient
- python-searchlightclient
- python-senlinclient
- python-swiftclient
- python-tackerclient
- python-troveclient
- python-watcherclient
- python-zaqarclient
- python-neutronclient
- python-openstackclient
- gnocchiclient
- python-octaviaclient
- setuptools_scm
- toml
constraints:
- https://raw.githubusercontent.com/openstack/requirements/stable/rocky/upper-constraints.txt
build-packages:
- libffi-dev
- libssl-dev
- libxml2-dev
- libxslt1-dev
- pkg-config
- gcc
override-prime: |
snapcraftctl prime
# Now that everything is built, let's disable user site-packages
# as stated in PEP-0370
sed -i usr/lib/python3.6/site.py -e 's/^ENABLE_USER_SITE = None$/ENABLE_USER_SITE = False/'
# This is the last step, let's now compile all our pyc files.
./usr/bin/python3 -m compileall .
# Generate completer script snippets
mkdir -p usr/share/bash-completion/completions
./bin/openstack complete > usr/share/bash-completion/completions/openstack
echo "complete -F _openstack openstackclients.openstack" >> usr/share/bash-completion/completions/openstack