Beispiel #1
0
 def delete(self, *args, **kwargs):
     from commands.apigateway import Nginx
     kwargs = self.to_dict()
     kwargs['deploy_type'] = 'vhosts.d'
     kwargs['instance'] = self.apigateway
     kwargs['category_id'] = self.id
     nginx = Nginx(**kwargs)
     status = nginx.destory()
     if status:
         super(Vhosts, self).delete()
     else:
         if nginx.redestory():
             print('%s Vhost Delete undo False' % self.domain)
         else:
             assert False, ('%s Vhost Delete False' % self.domain)
Beispiel #2
0
 def delete(self, *args, **kwargs):
     from commands.apigateway import Nginx
     kwargs = self.to_dict()
     kwargs['deploy_type'] = 'upstreams'
     kwargs['instance'] = self.apigateway
     kwargs['category_id'] = self.id
     nginx = Nginx(**kwargs)
     status = nginx.destory()
     if status:
         super(Upstreams, self).delete()
     else:
         if nginx.redestory():
             print('%s Upstream Delete undo True' % self.name)
         else:
             assert False, ('%s Upstream Delete undo False' % self.name)