-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2018 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
:returns: Content of response.
:rtype: bytearray
:raises HoneycombError: If the status code in response to PUT is not
- OK or ACCEPTED.
+ OK or ACCEPTED.
"""
if data:
:returns: Content of response.
:rtype: bytearray
:raises HoneycombError: If the operation fails or the response
- is not as expected.
+ is not as expected.
"""
status_code, resp = HcUtil.get_honeycomb_data(node, "oper_nat")
if status_code != HTTPCodes.OK:
raise HoneycombError("Could not retrieve NAT operational data.")
- if "nat-state" not in resp.keys():
+ if "nat" not in resp.keys():
raise HoneycombError(
- "Unexpected format, response does not contain nat-state.")
- return resp['nat-state']
+ "Unexpected format, response does not contain nat container.")
+ return resp['nat']
@staticmethod
def configure_nat_entries(node, data, instance=0, entry=1):
return NATKeywords._set_nat_properties(
node,
- '/nat-instances/nat-instance/{0}/'
+ '/instances/instance/{0}/'
'mapping-table/mapping-entry/{1}/'.format(instance, entry),
data)