Exemple #1
0
 def valid_resources(self):
     if hasattr(self, 'options'):
         for o in self.options:
             if 'attribute' in o:
                 service = o['attribute']
     else:
         return
     ret = Util.valid(self.halo.settings, service)
     if ret == 0:
         self.halo.cli.log("finished valid seccessfuly")
     return ret
Exemple #2
0
 def valid_resources(self):
     service = None
     if hasattr(self, 'options'):
         if self.options:
             for o in self.options:
                 if 'service' in o:
                     service = o['service']
     if not service:
         raise Exception("no service found")
     ret = Util.valid(self.halo.settings, service)
     if ret == 0:
         self.halo.cli.log("finished valid seccessfuly")
     return ret