# 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. """Magnum Docker RPC handler.""" from magnum.openstack.common import log as logging LOG = logging.getLogger(__name__) # These are the backend operations. They are executed by the backend # service. API calls via AMQP (within the ReST API) trigger the handlers to # be called. class Handler(object): def __init__(self): super(Handler, self).__init__() # Bay Operations def bay_create(id, name, type): return None
import copy from oslo_context import context as oslo_context import oslo_messaging as messaging from oslo_versionedobjects import base as ovoo_base import six from magnum.common import exception from magnum.objects import utils as obj_utils from magnum.openstack.common._i18n import _ from magnum.openstack.common._i18n import _LE from magnum.openstack.common import log as logging from magnum.openstack.common import versionutils LOG = logging.getLogger('object') class NotSpecifiedSentinel(object): pass def get_attrname(name): """Return the mangled name of the attribute's underlying storage.""" return '_%s' % name def make_class_properties(cls): # NOTE(danms/comstud): Inherit fields from super classes. # mro() returns the current class first and returns 'object' last, so # those can be skipped. Also be careful to not overwrite any fields
# 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. """Magnum Docker RPC handler.""" from docker import errors from oslo_config import cfg from magnum.common import docker_utils from magnum.common import exception from magnum.conductor.handlers.common import docker_client from magnum.openstack.common import log as logging LOG = logging.getLogger(__name__) CONF = cfg.CONF docker_opts = [ cfg.StrOpt('root_directory', default='/var/lib/docker', help='Path to use as the root of the Docker runtime.'), cfg.StrOpt('host_url', default='unix:///var/run/docker.sock', help='tcp://host:port to bind/connect to or ' 'unix://path/to/socket to use'), cfg.StrOpt('docker_remote_api_version', default=docker_client.DEFAULT_DOCKER_REMOTE_API_VERSION, help='Docker remote api version. Override it according to ' 'specific docker api version in your environment.'), cfg.BoolOpt('api_insecure',
import collections import copy from oslo_context import context as oslo_context import oslo_messaging as messaging import six from magnum.common import exception from magnum.objects import utils as obj_utils from magnum.openstack.common._i18n import _ from magnum.openstack.common._i18n import _LE from magnum.openstack.common import log as logging from magnum.openstack.common import versionutils LOG = logging.getLogger('object') class NotSpecifiedSentinel(object): pass def get_attrname(name): """Return the mangled name of the attribute's underlying storage.""" return '_%s' % name def make_class_properties(cls): # NOTE(danms/comstud): Inherit fields from super classes. # mro() returns the current class first and returns 'object' last, so # those can be skipped. Also be careful to not overwrite any fields