def create_entity(self):
     
     payload = {self._ENTITY_FIELD: self.get_template()}
     rest_session.send_post_request(url=self._REST_URL, data=json.dumps(payload))
     return rest_session.response_code, rest_session.response_as_text
Ejemplo n.º 2
0
    def create_instructions(self):

        payload = {self._INSTRUCTIONS_FIELD: self.get_template()}
        rest_session.send_post_request(url=self._REST_URL, data=json.dumps(payload))
        return rest_session.response_code, rest_session.response_as_text
Ejemplo n.º 3
0
    def create_ethernet_type(self):

        payload = {self._ETHERNET_TYPE_FIELD: self.get_template()}
        rest_session.send_post_request(url=self._REST_URL, data=json.dumps(payload))
        return rest_session.response_code, rest_session.response_as_text
Ejemplo n.º 4
0
    def create_output_action(self):

        payload = {self._OUTPUT_ACTION_FIELD: self.get_template()}
        rest_session.send_post_request(url=self._REST_URL, data=json.dumps(payload))
        return rest_session.response_code, rest_session.response_as_text
Ejemplo n.º 5
0
    def create_flow(self):

        payload = {self._FLOW_FIELD: self.get_payload()}
        rest_session.send_post_request(url=self._REST_URL, data=json.dumps(payload))
        return rest_session.response_code, rest_session.response_as_text
Ejemplo n.º 6
0
    def create_ip_match(self):

        payload = {self._IP_MATCH_FIELD: self.get_template()}
        rest_session.send_post_request(url=self._REST_URL, data=json.dumps(payload))
        return rest_session.response_code, rest_session.response_as_text