+
+ @staticmethod
+ def get_honeycomb_data(node, url_file):
+ """Retrieve data from Honeycomb according to given URL.
+
+ :param node: Honeycomb node.
+ :param url_file: URL file. The argument contains only the name of file
+ without extension, not the full path.
+ :type node: dict
+ :type url_file: str
+ :return: Requested information.
+ :rtype list
+ """
+
+ path = HoneycombUtil.read_path_from_url_file(url_file)
+ status_code, resp = HTTPRequest.get(node, path)
+ return status_code, resp
+
+ @staticmethod
+ def put_honeycomb_data(node, url_file, data, data_representation='json'):
+ """Send configuration data using PUT request and return the status code
+ and response.
+
+ :param node: Honeycomb node.
+ :param url_file: URL file. The argument contains only the name of file
+ without extension, not the full path.
+ :param data: Configuration data to be sent to Honeycomb.
+ :param data_representation: How the data is represented. Supported types
+ of representation are: json, xml and txt.
+ :type node: dict
+ :type url_file: str
+ :type data: str
+ :type data_representation: str
+ :return: Status code and content of response.
+ :rtype: tuple
+ """
+
+ headers = {'json':
+ {"Content-Type": "application/json",
+ 'Accept': 'text/plain'},
+ 'xml':
+ {"Content-Type": "application/xml",
+ 'Accept': 'text/plain'},
+ 'txt':
+ {"Content-Type": "text/plain",
+ 'Accept': 'text/plain'}
+ }
+ try:
+ header = headers[data_representation]
+ except KeyError as err:
+ raise HoneycombError("Wrong data type: {0}.".
+ format(data_representation), repr(err))
+
+ path = HoneycombUtil.read_path_from_url_file(url_file)
+ status_code, resp = HTTPRequest.put(node=node, path=path,
+ headers=header, payload=data)
+ return status_code, resp
+
+ @staticmethod
+ def delete_honeycomb_data(node, url_file):
+ """Delete data from Honeycomb according to given URL.
+
+ :param node: Honeycomb node.
+ :param url_file: URL file. The argument contains only the name of file
+ without extension, not the full path.
+ :type node: dict
+ :type url_file: str
+ :return: Status code and response.
+ :rtype tuple
+ """
+
+ path = HoneycombUtil.read_path_from_url_file(url_file)
+ return HTTPRequest.delete(node, path)