Update PTP API ref and unit tests
Add the PTP apply function to the API ref and the unit tests. Story: 2006759 Task: 38848 Change-Id: Iae3cc9e90b653fd92a83a0d9a216d87016cf4c6c Signed-off-by: David Sullivan <david.sullivan@windriver.com>
This commit is contained in:
parent
5b865b33d4
commit
347af170f9
|
@ -4467,6 +4467,17 @@ badMediaType (415)
|
||||||
"uuid":"70649b44-b462-445a-9fa5-9233a1b5842d"
|
"uuid":"70649b44-b462-445a-9fa5-9233a1b5842d"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*******************************
|
||||||
|
Applies the PTP configuration
|
||||||
|
*******************************
|
||||||
|
|
||||||
|
.. rest_method:: POST /v1/ptp/apply
|
||||||
|
|
||||||
|
**Normal response codes**
|
||||||
|
|
||||||
|
204
|
||||||
|
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
External OAM
|
External OAM
|
||||||
-------------
|
-------------
|
||||||
|
|
|
@ -47,7 +47,7 @@ class PTPTestCase(base.FunctionalTest):
|
||||||
self.ptp = self.dbapi.ptp_get_one()
|
self.ptp = self.dbapi.ptp_get_one()
|
||||||
self.ptp_uuid = self.ptp.uuid
|
self.ptp_uuid = self.ptp.uuid
|
||||||
|
|
||||||
def _get_path(self, ptp_id):
|
def _get_path(self, ptp_id=None):
|
||||||
if ptp_id:
|
if ptp_id:
|
||||||
path = '/ptp/' + ptp_id
|
path = '/ptp/' + ptp_id
|
||||||
else:
|
else:
|
||||||
|
@ -124,3 +124,15 @@ class PTPModifyTestCase(PTPTestCase):
|
||||||
|
|
||||||
dbutils.create_test_interface(**interface)
|
dbutils.create_test_interface(**interface)
|
||||||
self.modify_ptp_failure(self.transport_udp, "Invalid system configuration for UDP based PTP transport")
|
self.modify_ptp_failure(self.transport_udp, "Invalid system configuration for UDP based PTP transport")
|
||||||
|
|
||||||
|
|
||||||
|
class PTPApplyTestCase(PTPTestCase):
|
||||||
|
def setUp(self):
|
||||||
|
super(PTPApplyTestCase, self).setUp()
|
||||||
|
|
||||||
|
def test_apply_ptp(self):
|
||||||
|
# This is basically a null operation for the API but we should test that the function exists
|
||||||
|
apply_path = self._get_path() + "/apply"
|
||||||
|
# The apply takes no parameters
|
||||||
|
response = self.post_json(apply_path, {})
|
||||||
|
self.assertEqual(http_client.NO_CONTENT, response.status_int)
|
||||||
|
|
Loading…
Reference in New Issue