OpenLEADR / openleadr-python

Python library for OpenADR
https://openleadr.org/docs
Apache License 2.0
133 stars 51 forks source link

VEN Registration - Cancel Registration #100

Closed KriKu-coder closed 2 years ago

KriKu-coder commented 3 years ago

I'm working on VEN development. Quality logic Test Case Name : N1_0030_TH_VTN_1

I have to send cancel_party_registration from VEN to VTN but I'm not understanding what would be the case for it to send cancel_party_registration from VEN to VTN...

I'm attaching the QualityLogicTestTool log for your reference:

Test Case Name : N1_0030_TH_VTN_1 VEN Registration - Cancel Registration Test Start Time : Sat Oct 09 23:26:31 IST 2021 Test End Time : Sat Oct 09 23:29:20 IST 2021 Name of Implementation Version Number 1.1.5


Waiting for user action :Sat Oct 09 23:26:31 IST 2021 User action received. Playing Test Case again. :Sat Oct 09 23:26:34 IST 2021

Waiting for user action :Sat Oct 09 23:26:35 IST 2021 User action received. Playing Test Case again. :Sat Oct 09 23:26:35 IST 2021

-------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:56:36Z

----Client Address--- 127.0.0.1

----Header--- [Accept: /] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 522] [Host: 127.0.0.1:8080]

VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : EiRegisterParty

<?xml version="1.0" encoding="UTF-8"?>

ab6e3eeb-f574-44ec-91f4-c250b0da8026 Schema Validation has Passed Performing OadrQueryRegistration Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ Creating default OadrCreatedPartyRegistration ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:56:38Z 200 OK ab6e3eeb-f574-44ec-91f4-c250b0da8026 REG100921_195420_565 VEN100621_041428 TH_VTN 2.0a simpleHttp 2.0b simpleHttp xmpp PT10S EiRegisterParty A Key A Value My Extension A Key A Value Schema Validation has Passed Performing OadrCreatedPartyRegistration Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:56:38Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:56:39Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:56:40Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:56:40Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:56:50Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:56:51Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:57:00Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:57:01Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:57:10Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:57:11Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:57:20Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:57:20Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:57:30Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:57:31Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:57:40Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:57:41Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:57:50Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:57:51Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:58:00Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:58:01Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:58:10Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:58:10Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:58:20Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:58:20Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:58:30Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:58:30Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:58:40Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:58:40Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:58:50Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:58:50Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded -------------HTTP REQUEST------------------- Current Time : 2021-10-09T17:59:00Z ----Client Address--- 127.0.0.1 ----Header--- [Accept: */*] [Accept-Encoding: gzip, deflate] [User-Agent: Python/3.8 aiohttp/3.7.4.post0] [Content-Type: application/xml] [Content-Length: 406] [Host: 127.0.0.1:8080] VEN -> VTN ----------------REQUEST--------------------- Received by TestHarness VTN Service : OadrPoll VEN100621_041428 Schema Validation has Passed Performing OadrPollType Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ ----------------RESPONSE--------------------- Current Time : 2021-10-09T17:59:01Z 200 VEN100621_041428 Schema Validation has Passed Performing OadrResponse Conformance Rule validation Conformance Rule Validation Passed ------------------------------------------ -------------HTTP RESPONSE------------------ HTTP Status :OK (200) - The request has succeeded Expected 1 OadrCancelPartyRegistration(s), received 0 Test Case has Failed Waiting for user action :Sat Oct 09 23:29:06 IST 2021 User action received. Playing Test Case again. :Sat Oct 09 23:29:20 IST 2021
aru commented 2 years ago

Hi,

As stated in the spec:

The VTN or VEN may cancel an active registration using the oadrCancelPartyRegistration payload, referencing the registrationID (see Figure 16). The other party responds with an oadrCanceledRegistration payload.

From conformance rule #407 of the OpenADR 2.0b spec:

VTN/VEN, EiRegisterParty, oadrCancelPartyRegistration If a device receives an oadrCancelPartyRegistration from the other party, it MUST erase all information about this device, including exchanged Metadata reports, requested reports, and registration information.

The message can be sent from VTN or VEN it doesn't matter.

Hope this helps.