예제 #1
0
 def get(self, *args, **kargs):
     con_dict = {}
     for key in ['node_ip', 'port', 'con_id']:
         con_dict[key] = self.get_argument(key)
     myswarm = Myswarm()
     myswarm.stop_container(con_dict['node_ip'], con_dict['port'],
                            con_dict['con_id'])
예제 #2
0
 def get(self, *args, **kargs):
     con_dict = {}
     for key in ['node_ip', 'port', 'con_id']:
         con_dict[key] = self.get_argument(key)
     myswarm = Myswarm()
     myswarm.stop_container(con_dict['node_ip'], con_dict['port'],
                            con_dict['con_id'])
     self.redirect("/contlist?active=3&get_all_node=True")
예제 #3
0
    def get(self, *args, **kargs):
        con_dict = {}
        for key in ['node_ip', 'port', 'con_id']:
            con_dict[key] = self.get_argument(key)

        container_ip = {}
        myswarm = Myswarm()
        if not con_dict['con_id']:
            self.write("There is no container id")
        myswarm.stop_container(con_dict['node_ip'], con_dict['port'],
                               con_dict['con_id'])
        time.sleep(2)
        myswarm.start_container(con_dict['node_ip'], con_dict['port'],
                                con_dict['con_id'])