This patchset contains the code/charm for a working manila fileshare service. On its own, the fileshare the charm installs is not functional as a backend is needed. The charm-manila-generic plugin charm is provided separately to provide the generic NFS file share service. This patchset also includes the amulet/bundle tests to test that the charm installs the manila software and can get it running. However, no functional tests of the actual manila software are done. This patchset is dependent on the interface-manila-plugin interface and an updated version of charms.openstack that provides the 'options' member. It also depends on a slight change to the interface-neutron-plugin which adds a requires.py to allow it to be used to plugin to principal charms: these are declared below. Change-Id: Ie9bb7af1baab8b3bc20d26d907d9b51957eb326e Depends-On: Ied0ad014ab7b1d4778113b0d3f2bbae08075372e Depends-On: If6d103b4f62c95b0fa76562a18e418e0d319e987 Depends-On: I8760f2f9bec85ccc8b149b9560a6eed3e9ab418b
46 lines
2.0 KiB
Python
46 lines
2.0 KiB
Python
# Copyright 2016 Canonical Ltd
|
|
#
|
|
# 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
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# 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.
|
|
|
|
import sys
|
|
import mock
|
|
|
|
sys.path.append('src')
|
|
sys.path.append('src/lib')
|
|
|
|
# Mock out charmhelpers so that we can test without it.
|
|
# also stops sideeffects from occuring.
|
|
charmhelpers = mock.MagicMock()
|
|
apt_pkg = mock.MagicMock()
|
|
sys.modules['apt_pkg'] = apt_pkg
|
|
sys.modules['charmhelpers'] = charmhelpers
|
|
sys.modules['charmhelpers.core'] = charmhelpers.core
|
|
sys.modules['charmhelpers.core.hookenv'] = charmhelpers.core.hookenv
|
|
sys.modules['charmhelpers.core.host'] = charmhelpers.core.host
|
|
sys.modules['charmhelpers.core.unitdata'] = charmhelpers.core.unitdata
|
|
sys.modules['charmhelpers.core.templating'] = charmhelpers.core.templating
|
|
sys.modules['charmhelpers.contrib'] = charmhelpers.contrib
|
|
sys.modules['charmhelpers.contrib.openstack'] = charmhelpers.contrib.openstack
|
|
sys.modules['charmhelpers.contrib.openstack.utils'] = (
|
|
charmhelpers.contrib.openstack.utils)
|
|
sys.modules['charmhelpers.contrib.openstack.templating'] = (
|
|
charmhelpers.contrib.openstack.templating)
|
|
sys.modules['charmhelpers.contrib.network'] = charmhelpers.contrib.network
|
|
sys.modules['charmhelpers.contrib.network.ip'] = (
|
|
charmhelpers.contrib.network.ip)
|
|
sys.modules['charmhelpers.fetch'] = charmhelpers.fetch
|
|
sys.modules['charmhelpers.cli'] = charmhelpers.cli
|
|
sys.modules['charmhelpers.contrib.hahelpers'] = charmhelpers.contrib.hahelpers
|
|
sys.modules['charmhelpers.contrib.hahelpers.cluster'] = (
|
|
charmhelpers.contrib.hahelpers.cluster)
|