Esempio n. 1
0
 def delete_route_src_rule_path_pbrtable(self, route_id, netnodeip, data):
     """
     정책기반라우팅 테이블 삭제
     :param route_id:
     :return: {"message": "Success", "code": 200, "result": [{"PBR_TABLE": "local", "order": "0", "target": "from all lookup"}, {"PBR_TABLE": "main", "order": "32766", "target": "from all lookup"}, {"PBR_TABLE": "default", "order": "32767", "target": "from all lookup"}]}
     {"success": {"result": ["..."]}} 로 변환해서 return
     """
     url = self.CTRL_URL + "/route/src_rule/" + netnodeip + "/" + route_id + "/pbrtable"
     response = CustomHTTPClient.put_method(url, headers=self.HEADER, body=data)
     return self.confirm_status(response)
Esempio n. 2
0
    def delete_route_src_rule_path_type2(self, route_id, netnodeip, data):
        """

        :param route_id:
        :param data: {"type":"type2", "dest":"default", "via":"192.168.132.1","dev":"qr-b37c13d4-d1"}
        :return: {"message": "Success", "code": 200, "result": []}
        {"success": {"result": ["..."]}} 로 변환해서 return
        """
        url = self.CTRL_URL + "/route/src_rule/" + netnodeip + "/" + route_id + "/type2"
        response = CustomHTTPClient.put_method(url, headers=self.HEADER, body=data)
        return self.confirm_status(response)
Esempio n. 3
0
 def delete_route_src_rule_path_type1(self, route_id, netnodeip, data):
     """
     가상 라우터의 라우터 네임스페이스에서 정책기반라우팅 규칙 조회 후 삭제
     :param route_id:
     :param data: {"type":"type1", "src":"172.16.10/24"}
     :return: {"message": "Success", "code": 200, "result": [{"PBR_TABLE": "local", "order": "0", "target": "from all lookup"}, {"PBR_TABLE": "main", "order": "32766", "target": "from all lookup"}, {"PBR_TABLE": "default", "order": "32767", "target": "from all lookup"}]}
     {"success": {"result": ["..."]}} 로 변환해서 return
     """
     url = self.CTRL_URL + "/route/src_rule/" + netnodeip + "/" + route_id + "/type1"
     response = CustomHTTPClient.put_method(url, headers=self.HEADER, body=data)
     return self.confirm_status(response)
Esempio n. 4
0
 def delete_route_dst_rule_path(self, route_id, netnodeip, data):
     """
     목적지 기반 라우터 경로 삭제
     :param data: {"dest":"172.16.1.0/24", "via":"192.168.124.1","dev":"qr-90ce90aa-cb"}
     :param route_id: qrouter-fb4feaff-93b1-4564-8698-2ca8a67db277
     :return: {"message": "Success", "code": 200, "result": [{"Use": "0", "Iface": "qg-9f4212b2-d1", "Metric": "0", "Destination": "0.0.0.0", "Genmask": "0.0.0.0", "Flags": "UG", "Ref": "0", "Gateway": "10.10.200.1"}, {"Use": "0", "Iface": "qg-9f4212b2-d1", "Metric": "0", "Destination": "10.10.200.0", "Genmask": "255.255.255.0", "Flags": "U", "Ref": "0", "Gateway": "0.0.0.0"}, {"Use": "0", "Iface": "qr-90ce90aa-cb", "Metric": "0", "Destination": "192.168.124.0", "Genmask": "255.255.255.0", "Flags": "U", "Ref": "0", "Gateway": "0.0.0.0"}]}
     {"success": {"result": ["..."]}} 로 변환해서 return
     """
     url = self.CTRL_URL + "/route/dst_rule/" + netnodeip + "/" + route_id
     response = CustomHTTPClient.put_method(url, headers=self.HEADER, body=data)
     return self.confirm_status(response)