Ejemplo n.º 1
0
#    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 cloudpulse.db.sqlalchemy import api as dbapi
from cloudpulse import objects
from cloudpulse.openstack.common._i18n import _LI
from cloudpulse.openstack.common import log as logging
from cloudpulse.TestManager import TestManager
from oslo_config import cfg
import sys
import threading
from threading import Timer

LOG = logging.getLogger(__name__)
dblock = threading.RLock()

CONF = cfg.CONFCONF = cfg.CONF

test_manager = TestManager.TestManager()


def acquireLock():
    dblock.acquire()


def releaseLock():
    dblock.release()

Ejemplo n.º 2
0
#    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 cloudpulse.db.sqlalchemy import api as dbapi
from cloudpulse import objects
from cloudpulse.openstack.common._i18n import _LI
from cloudpulse.openstack.common import log as logging
from cloudpulse.TestManager import TestManager
from oslo_config import cfg
import sys
import threading
from threading import Timer

LOG = logging.getLogger(__name__)
dblock = threading.RLock()

CONF = cfg.CONFCONF = cfg.CONF

test_manager = TestManager.TestManager()


def acquireLock():
    dblock.acquire()


def releaseLock():
    dblock.release()

Ejemplo n.º 3
0
#         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.

"""Cloudpulse common internal object model"""

from oslo_versionedobjects import base as ovoo_base
from oslo_versionedobjects import fields as ovoo_fields

from cloudpulse.openstack.common import log as logging

LOG = logging.getLogger('object')
remotable_classmethod = ovoo_base.remotable_classmethod
remotable = ovoo_base.remotable


class CloudpulseObjectRegistry(ovoo_base.VersionedObjectRegistry):
    pass


class CloudpulseObject(ovoo_base.VersionedObject):
    """Base class and object factory.

    This forms the base of all objects that can be remoted or instantiated
    via RPC. Simply defining a class that inherits from this base class
    will make it remotely instantiatable. Objects should implement the
    necessary "get" classmethod routines as well as "save" object methods