"Fossies" - the Fresh Open Source Software Archive

Member "solum-12.0.0/solum/deployer/handlers/noop.py" (30 Mar 2022, 1352 Bytes) of package /linux/misc/openstack/solum-12.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "noop.py" see the Fossies "Dox" file reference documentation.

    1 # Copyright 2014 - Rackspace Hosting
    2 #
    3 #    Licensed under the Apache License, Version 2.0 (the "License");
    4 #    you may not use this file except in compliance with the License.
    5 #    You may obtain a copy of the License at
    6 #
    7 #        http://www.apache.org/licenses/LICENSE-2.0
    8 #
    9 #    Unless required by applicable law or agreed to in writing, software
   10 #    distributed under the License is distributed on an "AS IS" BASIS,
   11 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   12 #    See the License for the specific language governing permissions and
   13 #    limitations under the License.
   14 
   15 """Solum Deployer noop handler."""
   16 
   17 from oslo_log import log as logging
   18 
   19 from solum import objects
   20 
   21 LOG = logging.getLogger(__name__)
   22 
   23 
   24 class Handler(object):
   25     def echo(self, ctxt, message):
   26         LOG.debug("%s" % message)
   27 
   28     def deploy(self, ctxt, assembly_id, image_id, ports):
   29         message = ("Deploy %s %s %s" % (assembly_id, image_id, ports))
   30         LOG.debug("%s" % message)
   31 
   32     def destroy_assembly(self, ctxt, assem_id):
   33         assem = objects.registry.Assembly.get_by_id(ctxt, assem_id)
   34         assem.destroy(ctxt)
   35         message = ("Destroy %s" % (assem_id))
   36         LOG.debug("%s" % message)
   37 
   38     def destroy_app(self, ctxt, app_id):
   39         message = ("Destroy App %s" % (app_id))
   40         LOG.debug("%s" % message)