Charm Interface - Service Control
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OpenDev Sysadmins 1655a2c9ee OpenDev Migration Patch 5 hours ago
unit_tests Fixup repo config 3 months ago
.gitignore Fixup repo config 3 months ago
.gitreview OpenDev Migration Patch 5 hours ago
.stestr.conf Fixup repo config 3 months ago
.zuul.yaml Added tox environment for gathering coverage 1 month ago
README.md More RWADME updates 2 years ago
__init__.py Initial commit 2 years ago
copyright Switch to service-control 2 years ago
interface.yaml Change openstack-dev to openstack-discuss 3 months ago
requires.py Switch to service-control 2 years ago
test-requirements.txt Fixup repo config 3 months ago
tox.ini Added tox environment for gathering coverage 1 month ago

README.md

Overview

This interface is used for a charm to request a restart of a service managed by another charm.

Usage

The interface provides the {relation-name}.connected state.

Requesting a restart of all remote services:

@reactive.when('service-control.connected')
def configure(service_control):
    ...
    service_control.request_restart()

Requesting a restart of a specific type of remote services:

@reactive.when('service-control.connected')
def configure(service_control):
    ...
    service_control.request_restart(service_type='neutron')

Metadata

To consume this interface in your charm or layer, add the following to layer.yaml:

includes: ['interface:service-control']

and add a requires interface of type service-control to your charm or layers metadata.yaml eg:

requires:
  neutron-control:
    interface: service-control

Bugs

Please report bugs on Launchpad.

For development questions please refer to the OpenStack Charm Guide.