#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
""" retrieves the setting for 'zfs_volume_base' from Cinder's conf file in
order to set it up properly for Cinder to use.
"""
cinder_conf = "/etc/cinder/cinder.conf"
print "%s doesn't exist" % cinder_conf
# check if the SAN storage is used.
try:
local = False
# The script only handles the setup for local access as it needs to
# run in the remote node in the SAN environment.
if not local:
return smf_include.SMF_EXIT_OK
try:
# look to see if the dataset exists
try:
# the dataset doesn't exist, so go create it
try:
# get the mountpoint
if p.returncode != 0:
# set an ACL to all mountpoint access
try:
"A+user:cinder:add_subdirectory:allow",
print "ACL creation for mountpoint access of "
# set delegation
"clone,create,destroy,mount,snapshot", top_ds]
try:
return smf_include.SMF_EXIT_OK
if __name__ == "__main__":