from oslo_config import cfg from oslo_log import log as logging from oslo_utils import timeutils from guts.api import extensions from guts.api.openstack import wsgi from guts import exception from guts import objects from guts import rpc LOG = logging.getLogger(__name__) CONF = cfg.CONF authorize = extensions.extension_authorizer('migration', 'destinations') class DestinationsController(wsgi.Controller): """The destination hypervisor API controller for the OpenStack API.""" def __init__(self, ext_mgr): self.ext_mgr = ext_mgr super(DestinationsController, self).__init__() def _notify_source_error(self, ctxt, method, err, source=None, id=None, name=None):
import webob from oslo_config import cfg from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi from guts import exception from guts import objects from guts import rpc LOG = logging.getLogger(__name__) CONF = cfg.CONF authorize = extensions.extension_authorizer('migration', 'volumes') class VolumesController(wsgi.Controller): """The volume API controller for the OpenStack API.""" def __init__(self, ext_mgr): self.ext_mgr = ext_mgr super(VolumesController, self).__init__() def _notify_source_error(self, ctxt, method, err, source=None, id=None, name=None):
import webob from oslo_config import cfg from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi from guts import exception from guts import objects from guts import rpc LOG = logging.getLogger(__name__) CONF = cfg.CONF authorize = extensions.extension_authorizer('migration', 'networks') class NetworksController(wsgi.Controller): """The network API controller for the OpenStack API.""" def __init__(self, ext_mgr): self.ext_mgr = ext_mgr super(NetworksController, self).__init__() def _notify_source_error(self, ctxt, method, err, source=None, id=None, name=None): payload = dict(sources=source, name=name, id=id, error_message=err) rpc.get_notifier('source').error(ctxt, method, payload) def _notify_source_info(self, ctxt, method, source):
# License for the specific language governing permissions and limitations # under the License. from oslo_config import cfg from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi from guts.migration import vms CONF = cfg.CONF LOG = logging.getLogger(__name__) authorize = extensions.extension_authorizer('vms', '') class VMActionsController(wsgi.Controller): def __init__(self): super(VMActionsController, self).__init__() @wsgi.action('os-fetch_vms') def _fetch_vms(self, req, id, body): context = req.environ['guts.context'] vms.fetch_vms(context, id) class Vm_actions(extensions.ExtensionDescriptor): """Enables source VM actions."""
# 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. from oslo_config import cfg from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi CONF = cfg.CONF LOG = logging.getLogger(__name__) authorize = extensions.extension_authorizer('sources', '') class SourceActionsController(wsgi.Controller): def __init__(self): super(SourceActionsController, self).__init__() class Source_actions(extensions.ExtensionDescriptor): """Enables source hypervisor actions.""" name = "SourceActions" alias = "os-source-actions" namespace = "" updated = ""
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from oslo_config import cfg from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi CONF = cfg.CONF LOG = logging.getLogger(__name__) authorize = extensions.extension_authorizer('sources', '') class SourceActionsController(wsgi.Controller): def __init__(self): super(SourceActionsController, self).__init__() class Source_actions(extensions.ExtensionDescriptor): """Enables source hypervisor actions.""" name = "SourceActions" alias = "os-source-actions" namespace = "" updated = ""
# 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. from oslo_config import cfg from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi CONF = cfg.CONF LOG = logging.getLogger(__name__) authorize = extensions.extension_authorizer('types', '') class TypeActionsController(wsgi.Controller): def __init__(self): super(TypeActionsController, self).__init__() class Type_actions(extensions.ExtensionDescriptor): """Enables source hypervisor type actions.""" name = "TypeActions" alias = "os-type-actions" namespace = "" updated = ""
from oslo_utils import timeutils import webob.exc from guts.api import extensions from guts.api.openstack import wsgi from guts.api import xmlutil from guts import exception from guts.i18n import _ from guts import objects from guts import utils CONF = cfg.CONF LOG = logging.getLogger(__name__) authorize = extensions.extension_authorizer("migration", "services") class ServicesIndexTemplate(xmlutil.TemplateBuilder): def construct(self): root = xmlutil.TemplateElement("services") elem = xmlutil.SubTemplateElement(root, "service", selector="services") elem.set("binary") elem.set("host") elem.set("status") elem.set("state") elem.set("update_at") elem.set("disabled_reason") return xmlutil.MasterTemplate(root, 1)
import webob from oslo_config import cfg from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi from guts import exception from guts import objects from guts import rpc LOG = logging.getLogger(__name__) CONF = cfg.CONF authorize = extensions.extension_authorizer('migration', 'instances') class InstancesController(wsgi.Controller): """The instance API controller for the OpenStack API.""" def __init__(self, ext_mgr): self.ext_mgr = ext_mgr super(InstancesController, self).__init__() def _notify_source_error(self, ctxt, method, err, source=None, id=None, name=None):
import webob from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi from guts.api.views import sources as views_sources from guts import exception from guts.migration import sources from guts.migration import vms from guts import rpc from guts import utils LOG = logging.getLogger(__name__) authorize = extensions.extension_authorizer('migration', 'sources_manage') class SourcesController(wsgi.Controller): """The source hypervisor API controller for the OpenStack API.""" _view_builder_class = views_sources.ViewBuilder def __init__(self, ext_mgr): self.ext_mgr = ext_mgr super(SourcesController, self).__init__() def _notify_source_error(self, ctxt, method, err, source=None, id=None, name=None): payload = dict(sources=source, name=name, id=id, error_message=err) rpc.get_notifier('source').error(ctxt, method, payload)
from oslo_config import cfg from oslo_log import log as logging from oslo_utils import timeutils from guts.api import extensions from guts.api.openstack import wsgi from guts import exception from guts import objects from guts import rpc LOG = logging.getLogger(__name__) CONF = cfg.CONF authorize = extensions.extension_authorizer('migration', 'sources') class SourcesController(wsgi.Controller): """The source hypervisor API controller for the OpenStack API.""" def __init__(self, ext_mgr): self.ext_mgr = ext_mgr super(SourcesController, self).__init__() def _notify_source_error(self, ctxt, method, err, source=None, id=None, name=None): payload = dict(sources=source, name=name, id=id, error_message=err) rpc.get_notifier('source').error(ctxt, method, payload) def _notify_source_info(self, ctxt, method, source):
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from oslo_config import cfg from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi CONF = cfg.CONF LOG = logging.getLogger(__name__) authorize = extensions.extension_authorizer('types', '') class TypeActionsController(wsgi.Controller): def __init__(self): super(TypeActionsController, self).__init__() class Type_actions(extensions.ExtensionDescriptor): """Enables source hypervisor type actions.""" name = "TypeActions" alias = "os-type-actions" namespace = "" updated = ""
from oslo_utils import timeutils import webob.exc from guts.api import extensions from guts.api.openstack import wsgi from guts.api import xmlutil from guts import exception from guts.i18n import _ from guts import objects from guts import utils CONF = cfg.CONF LOG = logging.getLogger(__name__) authorize = extensions.extension_authorizer('migration', 'services') class ServicesIndexTemplate(xmlutil.TemplateBuilder): def construct(self): root = xmlutil.TemplateElement('services') elem = xmlutil.SubTemplateElement(root, 'service', selector='services') elem.set('binary') elem.set('host') elem.set('status') elem.set('state') elem.set('update_at') elem.set('disabled_reason') return xmlutil.MasterTemplate(root, 1)
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from oslo_config import cfg from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi CONF = cfg.CONF LOG = logging.getLogger(__name__) authorize = extensions.extension_authorizer('migrations', '') class MigrationActionsController(wsgi.Controller): def __init__(self): super(MigrationActionsController, self).__init__() class Migration_actions(extensions.ExtensionDescriptor): """Enables migration actions.""" name = "MigrationActions" alias = "os-migration-actions" namespace = "" updated = ""
import six import webob from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi from guts.api.views import migrations as views_migrations from guts import exception from guts.migration import migrations from guts import rpc from guts import utils LOG = logging.getLogger(__name__) authorize = extensions.extension_authorizer('migration', 'migrations_manage') class MigrationsController(wsgi.Controller): """The migration API controller for the OpenStack API.""" _view_builder_class = views_migrations.ViewBuilder def __init__(self, ext_mgr): self.ext_mgr = ext_mgr super(MigrationsController, self).__init__() def _notify_migration_error(self, ctxt, method, err, migration=None, id=None, name=None): payload = dict(migrations=migration, name=name, id=id, error_message=err) rpc.get_notifier('migration').error(ctxt, method, payload)
import webob from oslo_config import cfg from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi from guts import exception from guts import objects from guts import rpc LOG = logging.getLogger(__name__) CONF = cfg.CONF authorize = extensions.extension_authorizer('migration', 'instances') class InstancesController(wsgi.Controller): """The instance API controller for the OpenStack API.""" def __init__(self, ext_mgr): self.ext_mgr = ext_mgr super(InstancesController, self).__init__() def _notify_source_error(self, ctxt, method, err, source=None, id=None, name=None): payload = dict(sources=source, name=name, id=id, error_message=err) rpc.get_notifier('source').error(ctxt, method, payload) def _notify_source_info(self, ctxt, method, source):
import webob from webob import exc from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi from guts.api.views import vms as views_vms from guts import exception from guts.migration import vms from guts import rpc LOG = logging.getLogger(__name__) authorize = extensions.extension_authorizer('migration', 'vms_manage') class VMsController(wsgi.Controller): """The source VM API controller for the OpenStack API.""" _view_builder_class = views_vms.ViewBuilder def __init__(self, ext_mgr): self.ext_mgr = ext_mgr super(VMsController, self).__init__() def _notify_vm_error(self, ctxt, method, err, vm=None, id=None, name=None): payload = dict(vms=vm, name=name, id=id, error_message=err) rpc.get_notifier('vm').error(ctxt, method, payload) def _notify_vm_info(self, ctxt, method, vm):
from oslo_config import cfg from oslo_log import log as logging from oslo_utils import timeutils from guts.api import extensions from guts.api.openstack import wsgi from guts import exception from guts import objects from guts import rpc LOG = logging.getLogger(__name__) CONF = cfg.CONF authorize = extensions.extension_authorizer('migration', 'destinations') class DestinationsController(wsgi.Controller): """The destination hypervisor API controller for the OpenStack API.""" def __init__(self, ext_mgr): self.ext_mgr = ext_mgr super(DestinationsController, self).__init__() def _notify_source_error(self, ctxt, method, err, source=None, id=None, name=None): payload = dict(sources=source, name=name, id=id, error_message=err) rpc.get_notifier('source').error(ctxt, method, payload) def _notify_source_info(self, ctxt, method, source):
import webob from oslo_config import cfg from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi from guts import exception from guts import objects from guts import rpc LOG = logging.getLogger(__name__) CONF = cfg.CONF authorize = extensions.extension_authorizer('migration', 'networks') class NetworksController(wsgi.Controller): """The network API controller for the OpenStack API.""" def __init__(self, ext_mgr): self.ext_mgr = ext_mgr super(NetworksController, self).__init__() def _notify_source_error(self, ctxt, method, err, source=None, id=None, name=None):
import webob from oslo_config import cfg from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi from guts import exception from guts import objects from guts import rpc LOG = logging.getLogger(__name__) CONF = cfg.CONF authorize = extensions.extension_authorizer('migration', 'volumes') class VolumesController(wsgi.Controller): """The volume API controller for the OpenStack API.""" def __init__(self, ext_mgr): self.ext_mgr = ext_mgr super(VolumesController, self).__init__() def _notify_source_error(self, ctxt, method, err, source=None, id=None, name=None): payload = dict(sources=source, name=name, id=id, error_message=err) rpc.get_notifier('source').error(ctxt, method, payload) def _notify_source_info(self, ctxt, method, source):
import webob from oslo_config import cfg from oslo_log import log as logging from guts.api import extensions from guts.api.openstack import wsgi from guts import exception from guts import objects from guts import rpc LOG = logging.getLogger(__name__) CONF = cfg.CONF authorize = extensions.extension_authorizer('migration', 'resources') class ResourcesController(wsgi.Controller): """The resource API controller for the OpenStack API.""" def __init__(self, ext_mgr): self.ext_mgr = ext_mgr super(ResourcesController, self).__init__() def _notify_source_error(self, ctxt, method, err, source=None, id=None, name=None): payload = dict(sources=source, name=name, id=id, error_message=err) rpc.get_notifier('source').error(ctxt, method, payload) def _notify_source_info(self, ctxt, method, source):