def __init__(self, other=None):
        if isinstance(other, _Service):
            self.__dict__ = _copy(other.__dict__)

            if not self.is_accounting_service():
                raise AccountingServiceError(
                    "Cannot construct an AccountingService from "
                    "a service which is not an accounting service!")
        else:
            _Service.__init__(self)
Beispiel #2
0
    def __init__(self, other=None):
        if isinstance(other, _Service):
            self.__dict__ = _copy(other.__dict__)

            if not self.is_identity_service():
                raise IdentityServiceError(
                    "Cannot construct an IdentityService from "
                    "a service which is not an identity service!")
        else:
            _Service.__init__(self)
    def __init__(self, other=None):
        if isinstance(other, _Service):
            self.__dict__ = _copy(other.__dict__)

            if not self.is_compute_service():
                from Acquire.Compute import ComputeServiceError
                raise ComputeServiceError(
                    "Cannot construct a ComputeService from "
                    "a service which is not an compute service!")
        else:
            _Service.__init__(self)
    def __init__(self, other=None):
        if isinstance(other, _Service):
            self.__dict__ = _copy(other.__dict__)

            if not self.is_access_service():
                from Acquire.Access import AccessServiceError
                raise AccessServiceError(
                    "Cannot construct an AccessService from "
                    "a service which is not an access service!")
        else:
            _Service.__init__(self)
Beispiel #5
0
    def __init__(self, other=None):
        if isinstance(other, _Service):
            self.__dict__ = _copy(other.__dict__)

            if not self.is_storage_service():
                from Acquire.Storage import StorageServiceError
                raise StorageServiceError(
                    "Cannot construct an StorageService from "
                    "a service which is not an storage service!")
        else:
            _Service.__init__(self)
            self._storage_compartment_id = None
Beispiel #6
0
    def __init__(self, other=None):
        if isinstance(other, _Service):
            from copy import copy as _copy
            self.__dict__ = _copy(other.__dict__)

            if not self.is_registry_service():
                from Acquire.Registry import RegistryServiceError
                raise RegistryServiceError(
                    "Cannot construct a RegistryService from "
                    "a service which is not a registry service!")
        else:
            _Service.__init__(self)
Beispiel #7
0
    def __init__(self, other=None):
        if isinstance(other, _Service):
            self.__dict__ = _copy(other.__dict__)

            if self.service_type() != "hugs":
                from hugs.Service import HugsServiceError

                raise HugsServiceError(
                    "Cannot construct a HugsService from a service which is not a hugs service!"
                )
        else:
            _Service.__init__(self)
Beispiel #8
0
    def __init__(self, other=None):
        if isinstance(other, _Service):
            self.__dict__ = _copy(other.__dict__)

            if not self.is_storage_service():
                from Acquire.Storage import StorageServiceError
                raise StorageServiceError(
                    "Cannot construct an StorageService from "
                    "a service which is not an storage service!")

            # the storage service must define the ID for the compartment
            # in which user data will be stored
            self._storage_compartment_id = _os.getenv("STORAGE_COMPARTMENT")
        else:
            _Service.__init__(self)
            self._storage_compartment_id = None