Пример #1
0
#!/usr/bin/env python3

# Load modules from $CHARM_DIR/lib
import sys
sys.path.append('lib')

from charms.layer.basic import bootstrap_charm_deps
bootstrap_charm_deps()


# This will load and run the appropriate @hook and other decorated
# handlers from $CHARM_DIR/reactive, $CHARM_DIR/hooks/reactive,
# and $CHARM_DIR/hooks/relations.
#
# See https://jujucharms.com/docs/stable/authors-charm-building
# for more information on this pattern.
from charms.reactive import main
main()
Пример #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 os
import sys

# Load modules from $CHARM_DIR/lib
sys.path.append("lib")

from charms.layer import basic

basic.bootstrap_charm_deps()
basic.init_config_states()

import charmhelpers.core.hookenv as hookenv

import charms_openstack.charm

# import the trilio_wlm module to get the charm definitions created.
import charm.openstack.trilio_dm  # noqa


def ghost_share(*args):
    """Ghost mount secondard TV deployment nfs-share
    """
    secondary_nfs_share = hookenv.action_get("nfs-shares")
    with charms_openstack.charm.provide_charm_instance() as trilio_dm_charm:
Пример #3
0
#!/usr/bin/env python3
import sys
sys.path.append('lib')

# Make sure that reactive is bootstrapped and all the states are setup
# properly
from charms.layer import basic
basic.bootstrap_charm_deps()
basic.init_config_states()

import charm.openstack.tempest as tempest
import charms.reactive.relations as relations
import charmhelpers.core.hookenv as hookenv


if __name__ == '__main__':
    identity_int = relations.endpoint_from_flag('identity-admin.available')
    if identity_int is None:
        # The interface isn't connected, so we can't do this yet
        hookenv.action_fail(
            "The identity-admin interface is not available - bailing")
    else:
        tempest.render_configs([identity_int])
        tempest.run_test('smoke')