Example #1
0
 def inner(self, *args, **kwargs):
     try:
         access = args[0].get('access').filter(
             tipo_acesso__protocolo='https').uniqueResult()
         self._lb = lb.Lb(access.fqdn, access.user, access.password, False)
         return func(self, *args, **kwargs)
     except bigsuds.OperationFailed, e:
         log.error(e)
         raise base_exceptions.CommandErrorException(e)
Example #2
0
 def inner(self, *args, **kwargs):
     try:
         access = args[0].get('access').filter(
             tipo_acesso__protocolo='https').uniqueResult()
         self._lb = lb.Lb(access.fqdn, access.user, access.password)
         self._lb._channel.System.Session.set_transaction_timeout(60)
         return func(self, *args, **kwargs)
     except bigsuds.OperationFailed, e:
         log.error(e)
         raise base_exceptions.CommandErrorException(e)
Example #3
0
 def inner(self, *args, **kwargs):
     if not kwargs.__contains__('connection') or kwargs['connection']:
         try:
             access = args[0].get('access').filter(
                 tipo_acesso__protocolo='https').uniqueResult()
             self._lb = lb.Lb(access.fqdn, access.user, access.password)
             if not kwargs.__contains__('transation') or kwargs['transation']:
                 log.info('Transaction Started')
                 with bigsuds.Transaction(self._lb._channel):
                     return func(self, *args, **kwargs)
             else:
                 return func(self, *args, **kwargs)
         except bigsuds.OperationFailed, e:
             log.error(e)
             raise base_exceptions.CommandErrorException(e)
         except Exception, e:
             log.error('Error  %s' % e)
             raise base_exceptions.CommandErrorException(e)