Browse Source

Rename the module from pyopenadr to openleadr (excluding renaming the directory)

Stan Janssen 4 years ago
parent
commit
9aa39b6b07

+ 5 - 5
README.md

@@ -1,13 +1,13 @@
-# PyOpenADR
+![OpenLEADR](logo.png)
 
-PyOpenADR is a Python 3 module that provides a convenient interface to OpenADR
+OpenLEADR is a Python 3 module that provides a convenient interface to OpenADR
 systems. It contains an OpenADR Client that you can use to talk to other OpenADR
 systems, and it contains an OpenADR Server (VTN) with convenient integration
 possibilities.
 
 ## Documentation
 
-You can find documentation here: https://finetuned.nl/pyopenadr
+You can find documentation here: https://openleadr.elaad.io/docs
 
 ## Contributing
 
@@ -17,8 +17,8 @@ new bug reports and pull requests are most welcome.
 ## Developing
 
 ```bash
-git clone https://git.finetuned.nl/stan/pyopenadr
-cd pyopenadr
+git clone https://github.com/openleadr/openleadr-python
+cd pyopenadr-python
 python3 -m venv python_env
 ./python_env/bin/pip3 install -e .
 ```

+ 2 - 2
docs/api/modules.rst

@@ -1,7 +1,7 @@
-pyopenadr
+openleadr
 =========
 
 .. toctree::
    :maxdepth: 4
 
-   pyopenadr
+   openleadr

+ 18 - 18
docs/api/pyopenadr.rst

@@ -1,69 +1,69 @@
-pyopenadr package
+openleadr package
 =================
 
 Submodules
 ----------
 
-pyopenadr.client module
+openleadr.client module
 -----------------------
 
-.. automodule:: pyopenadr.client
+.. automodule:: openleadr.client
    :members:
    :undoc-members:
    :show-inheritance:
 
-pyopenadr.enums module
+openleadr.enums module
 ----------------------
 
-.. automodule:: pyopenadr.enums
+.. automodule:: openleadr.enums
    :members:
    :undoc-members:
    :show-inheritance:
 
-pyopenadr.errors module
+openleadr.errors module
 -----------------------
 
-.. automodule:: pyopenadr.errors
+.. automodule:: openleadr.errors
    :members:
    :undoc-members:
    :show-inheritance:
 
-pyopenadr.messaging module
+openleadr.messaging module
 --------------------------
 
-.. automodule:: pyopenadr.messaging
+.. automodule:: openleadr.messaging
    :members:
    :undoc-members:
    :show-inheritance:
 
-pyopenadr.objects module
+openleadr.objects module
 ------------------------
 
-.. automodule:: pyopenadr.objects
+.. automodule:: openleadr.objects
    :members:
    :undoc-members:
    :show-inheritance:
 
-pyopenadr.preflight module
+openleadr.preflight module
 --------------------------
 
-.. automodule:: pyopenadr.preflight
+.. automodule:: openleadr.preflight
    :members:
    :undoc-members:
    :show-inheritance:
 
-pyopenadr.server module
+openleadr.server module
 -----------------------
 
-.. automodule:: pyopenadr.server
+.. automodule:: openleadr.server
    :members:
    :undoc-members:
    :show-inheritance:
 
-pyopenadr.utils module
+openleadr.utils module
 ----------------------
 
-.. automodule:: pyopenadr.utils
+.. automodule:: openleadr.utils
    :members:
    :undoc-members:
    :show-inheritance:
@@ -71,7 +71,7 @@ pyopenadr.utils module
 Module contents
 ---------------
 
-.. automodule:: pyopenadr
+.. automodule:: openleadr
    :members:
    :undoc-members:
    :show-inheritance:

+ 14 - 14
docs/api/pyopenadr.service.rst

@@ -1,53 +1,53 @@
-pyopenadr.service package
+openleadr.service package
 =========================
 
 Submodules
 ----------
 
-pyopenadr.service.event\_service module
+openleadr.service.event\_service module
 ---------------------------------------
 
-.. automodule:: pyopenadr.service.event_service
+.. automodule:: openleadr.service.event_service
    :members:
    :undoc-members:
    :show-inheritance:
 
-pyopenadr.service.opt\_service module
+openleadr.service.opt\_service module
 -------------------------------------
 
-.. automodule:: pyopenadr.service.opt_service
+.. automodule:: openleadr.service.opt_service
    :members:
    :undoc-members:
    :show-inheritance:
 
-pyopenadr.service.poll\_service module
+openleadr.service.poll\_service module
 --------------------------------------
 
-.. automodule:: pyopenadr.service.poll_service
+.. automodule:: openleadr.service.poll_service
    :members:
    :undoc-members:
    :show-inheritance:
 
-pyopenadr.service.registration\_service module
+openleadr.service.registration\_service module
 ----------------------------------------------
 
-.. automodule:: pyopenadr.service.registration_service
+.. automodule:: openleadr.service.registration_service
    :members:
    :undoc-members:
    :show-inheritance:
 
-pyopenadr.service.report\_service module
+openleadr.service.report\_service module
 ----------------------------------------
 
-.. automodule:: pyopenadr.service.report_service
+.. automodule:: openleadr.service.report_service
    :members:
    :undoc-members:
    :show-inheritance:
 
-pyopenadr.service.vtn\_service module
+openleadr.service.vtn\_service module
 -------------------------------------
 
-.. automodule:: pyopenadr.service.vtn_service
+.. automodule:: openleadr.service.vtn_service
    :members:
    :undoc-members:
    :show-inheritance:
@@ -56,7 +56,7 @@ pyopenadr.service.vtn\_service module
 Module contents
 ---------------
 
-.. automodule:: pyopenadr.service
+.. automodule:: openleadr.service
    :members:
    :undoc-members:
    :show-inheritance:

+ 2 - 2
docs/client.rst

@@ -19,7 +19,7 @@ The Event consists of three main sections:
 2. A list of Targets to which the Event applies (``target``). This can be the VEN as a whole, or specific groups, assets, geographic areas, et cetera that this VEN represents.
 3. A list of Signals (``signals``), which form the content of the Event. This can be price signals, load reduction signals, et cetera. Each signal has a name, a type, multiple Intervals that contain the relative start times, and some payload value for the client to interpret.
 
-After you evaluate all these properties, you have only one decision to make: Opt In or Opt Out. Your handler must return either the string ``optIn`` or ``optOut``, and pyOpenADR will see to it that your response is correctly formatted for the server.
+After you evaluate all these properties, you have only one decision to make: Opt In or Opt Out. Your handler must return either the string ``optIn`` or ``optOut``, and OpenLEADR will see to it that your response is correctly formatted for the server.
 
 Example implementation:
 
@@ -60,7 +60,7 @@ For example: you can provide 15-minute meter readings for an energy meter at you
         current_value = await meter.read()
         return current_value
 
-And you configure this report in pyOpenADR using an :ref:`oadrReportDescription` dict:
+And you configure this report in OpenLEADR using an :ref:`oadrReportDescription` dict:
 
 .. code-block:: python3
 

+ 2 - 2
docs/conf.py

@@ -17,7 +17,7 @@ sys.path.insert(0, os.path.abspath('..'))
 
 # -- Project information -----------------------------------------------------
 
-project = 'pyOpenADR'
+project = 'OpenLEADR'
 copyright = '2020, Stan Janssen'
 author = 'Stan Janssen'
 
@@ -34,7 +34,7 @@ print(release)
 # ones.
 extensions = ['sphinx.ext.autodoc', 'sphinxcontrib.apidoc']
 
-apidoc_module_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'pyopenadr')
+apidoc_module_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'openleadr')
 apidoc_excluded_paths = [os.path.join(apidoc_module_dir, 'service'),
                          os.path.join(apidoc_module_dir, 'config.py')]
 

+ 2 - 2
docs/examples.rst

@@ -4,7 +4,7 @@
 Ready-to-Run Examples
 =====================
 
-This page contains examples for pyOpenADR:
+This page contains examples for OpenLEADR:
 
 .. _client_example:
 
@@ -15,7 +15,7 @@ This example sets up a minimal OpenADR Client (Virtual End Node):
 
 .. code-block:: python3
 
-    from pyopenadr import OpenADRClient
+    from openleadr import OpenADRClient
     import asyncio
 
     async def main():

+ 6 - 5
docs/index.rst

@@ -4,7 +4,7 @@
    contain the root `toctree` directive.
 
 ====================
-Welcome to pyOpenADR
+Welcome to OpenLEADR
 ====================
 
 Super-convenient Python implementation of an OpenADR client and server.
@@ -36,16 +36,16 @@ Library Installation
 
 .. code-block:: bash
 
-   $ pip install pyopenadr
+   $ pip install openleadr
 
-pyOpenADR is compatible with Python 3.6+
+OpenLEADR is compatible with Python 3.6+
 
 Getting Started
 ===============
 
 Client example::
 
-    from pyopenadr import OpenADRClient
+    from openleadr import OpenADRClient
     import asyncio
 
     async def main():
@@ -96,6 +96,7 @@ Table of Contents
    examples
    roadmap
    representations
+   message_signing
    API Reference <api/modules>
 
 Representations of OpenADR payloads
@@ -121,7 +122,7 @@ For example, this XML payload:
       </oadrSignedObject>
     </oadrPayload>
 
-is represented in pyOpenADR as:
+is represented in OpenLEADR as:
 
 .. code-block:: python3
 

+ 25 - 25
docs/representations.rst

@@ -61,7 +61,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -95,7 +95,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -132,7 +132,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -164,7 +164,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -196,7 +196,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -223,7 +223,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -253,7 +253,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -320,7 +320,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -390,7 +390,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -439,7 +439,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -473,7 +473,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -524,7 +524,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -568,7 +568,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -609,7 +609,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -674,7 +674,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -884,7 +884,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -961,7 +961,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -987,7 +987,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -1096,7 +1096,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -1153,7 +1153,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -1180,7 +1180,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -1212,7 +1212,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -1239,7 +1239,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -1280,7 +1280,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 
@@ -1342,7 +1342,7 @@ OpenADR payload:
       </oadrSignedObject>
     </oadrPayload>
 
-pyOpenADR representation:
+OpenLEADR representation:
 
 .. code-block:: python3
 

+ 1 - 1
docs/roadmap.rst

@@ -4,7 +4,7 @@
 Project Status and Roadmap
 ==========================
 
-pyOpenADR is under development. The current version is |release|.
+OpenLEADR is under development. The current version is |release|.
 
 Upcoming releases
 -----------------

+ 142 - 5
docs/server.rst

@@ -4,7 +4,7 @@
 Server
 ======
 
-If you are implementing an OpenADR Server ("Virtual Top Node") using pyOpenADR, read this page.
+If you are implementing an OpenADR Server ("Virtual Top Node") using OpenLEADR, read this page.
 
 .. _server_registration:
 
@@ -30,7 +30,7 @@ Example implementation:
 
 .. code-block:: python3
 
-    from pyopenadr.utils import generate_id
+    from openleadr.utils import generate_id
 
     async def on_create_party_registration(payload):
         ven_id = payload['ven_id']
@@ -99,7 +99,7 @@ The VEN should actively supply the reports to the VTN using :ref:`oadrUpdateRepo
 
 .. admonition:: Implementation Checklist
 
-    To benefit from the automatic reporting engine in pyOpenADR, you should implement the following items yourself:
+    To benefit from the automatic reporting engine in OpenLEADR, you should implement the following items yourself:
 
     1. Configure the OpenADRServer() instance with your reporting capabilities and requirements
     2. Implement a handlers that can retrieve the reports from your backend system
@@ -123,7 +123,7 @@ You should implement the following handlers:
 Non-OpenADR signals from the server
 ===================================
 
-The pyOpenADR Server can call the following handlers, which are not part of the regular openADR communication flow, but can help you develop a more robust event-driven system:
+The OpenLEADR Server can call the following handlers, which are not part of the regular openADR communication flow, but can help you develop a more robust event-driven system:
 
 - ``on_ven_online(ven_id)``: called when a VEN sends an :ref:`oadrPoll`, :ref:`oadrRequestEvent` or :ref:`oadrRequestReport` message after it had been offline before.
 - ``on_ven_offline(ven_id)``: called when a VEN misses 3 consecutive poll intervals (configurable).
@@ -132,7 +132,7 @@ Example implementation:
 
 .. code-block:: python3
 
-    from pyopenadr import OpenADRServer
+    from openleadr import OpenADRServer
 
     server = OpenADRServer(vtn_id='MyVTN')
     server.add_handler('on_ven_online', on_ven_online)
@@ -143,3 +143,140 @@ Example implementation:
 
     async def on_ven_offline(ven_id):
         print(f"VEN {ven_id} has gone AWOL")
+
+.. _server_signing_messages:
+
+Signing Messages
+================
+
+The OpenLEADR can sign your messages and validate incoming messages. For some background, see the :ref:`message_signing`.
+
+Example implementation:
+
+.. code-block:: python3
+
+    from openleadr import OpenADRServr
+
+    def fingerprint_lookup(ven_id):
+        # Look up the certificate fingerprint that is associated with this VEN.
+        fingerprint = database.lookup('certificate_fingerprint').where(ven_id=ven_id) # Pseudo code
+        return fingerprint
+
+    server = OpenADRServer(vtn_id='MyVTN',
+                           cert='/path/to/cert.pem',
+                           key='/path/to/private/key.pem',
+                           passphrase='mypassphrase',
+                           validation_handler=fingerprint_lookup)
+
+The VEN's fingerprint should be obtained from the VEN outside of OpenADR.
+
+
+.. _server_message_handlers:
+
+Message Handlers
+================
+
+Your server has to deal with the different OpenADR messages. The way this works is that OpenLEADR will expose certain modules at the appropriate endpoints (like /oadrPoll and /EiRegister), and figure out what type of message is being sent. It will then call your handler with the contents of the message that are relevant for you to handle. This section provides an overview with examples for the different kinds of messages that you can expect and what should be returned.
+
+.. _server_on_created_event:
+
+on_created_event
+----------------
+
+The VEN informs you that they created an Event that you sent to them. You don't have to return anything.
+
+Return: `None`
+
+.. _server_on_request_event:
+
+on_request_event
+----------------
+
+The VEN is requesting the next Event that you have for it. You should return an Event. If you have no Events for this VEN, you should return `None`.
+
+.. _server_on_register_report:
+
+on_register_report
+------------------
+
+The VEN informs you which reports it has available. If you want to periodically receive any of these reports, you should return a list of the r_ids that you want to receive.
+
+Signature:
+
+.. code-block:: python3
+
+    async def on_register_report(ven_id, reports):
+
+
+.. _server_on_created_report:
+
+on_created_report
+-----------------
+
+The VEN informs you that it created the automatic reporting that you requested. You don't have to return anything.
+
+Return: `None`
+
+.. _server_on_update_report:
+
+on_update_report
+----------------
+
+The VEN is sending you a fresh report with data. You don't have to return anything.
+
+Signature:
+
+.. code-block:: python3
+
+    async def on_update_report(ven_id, report):
+        ...
+        return None
+
+.. _server_on_poll:
+
+on_poll
+-------
+
+The VEN is requesting the next message that you have for it. You should return a tuple of message_type and message_payload as a dict. If there is no message for the VEN, you should return `None`.
+
+Signature:
+
+.. code-block:: python3
+
+    async def on_poll(ven_id):
+        ...
+        return message_type, message_payload
+
+.. _server_on_query_registration:
+
+on_query_registration
+---------------------
+
+A prospective VEN is requesting information about your VTN, like the versions and transports you support. You should not implement this handler and let OpenLEADR handle this response.
+
+.. _server_on_create_party_registration:
+
+on_create_party_registration
+----------------------------
+
+The VEN tries to register with you. You will probably have manually configured the VEN beforehand, so you should look them up by their ven_name. You should have a ven_id that you generated ready.
+If they are allowed to register, return the ven_id (str), otherwise return False.
+
+.. code-block:: python3
+
+    async def on_create_party_registration(ven_name):
+        if ven_is_known:
+            return ven_id
+        else
+            return None
+
+.. _server_on_cancel_party_registration:
+
+on_cancel_party_registration
+----------------------------
+
+The VEN informs you that they are cancelling their registration and no longer wish to be contacted by you.
+
+You should deregister the VEN internally, and return `None`.
+
+Return: `None`

BIN
logo.png


+ 6 - 6
pyopenadr/client.py

@@ -21,9 +21,9 @@ OpenADR Client for Python
 import xmltodict
 import random
 import aiohttp
-from pyopenadr.utils import new_request_id, peek, generate_id
-from pyopenadr.messaging import create_message, parse_message
-from pyopenadr import enums
+from openleadr.utils import new_request_id, peek, generate_id, certificate_fingerprint
+from openleadr.messaging import create_message, parse_message
+from openleadr import enums
 from datetime import datetime, timedelta, timezone
 from http import HTTPStatus
 from apscheduler.schedulers.asyncio import AsyncIOScheduler
@@ -127,9 +127,9 @@ class OpenADRClient:
 
         :param callable callable: A callable or coroutine that will fetch the value for a specific report. This callable will be passed the report_id and the r_id of the requested value.
         :param str report_id: A unique identifier for this report.
-        :param str report_name: An OpenADR name for this report (one of pyopenadr.enums.REPORT_NAME)
-        :param str reading_type: An OpenADR reading type (found in pyopenadr.enums.READING_TYPE)
-        :param str report_type: An OpenADR report type (found in pyopenadr.enums.REPORT_TYPE)
+        :param str report_name: An OpenADR name for this report (one of openleadr.enums.REPORT_NAME)
+        :param str reading_type: An OpenADR reading type (found in openleadr.enums.READING_TYPE)
+        :param str report_type: An OpenADR report type (found in openleadr.enums.REPORT_TYPE)
         :param datetime.timedelta sampling_rate: The sampling rate for the measurement.
         :param resource_id: A specific name for this resource within this report.
         :param str unit: The unit for this measurement.

+ 1 - 1
pyopenadr/messaging.py

@@ -104,7 +104,7 @@ NONCE_CACHE = set()
 
 
 # Settings for jinja2
-TEMPLATES = Environment(loader=PackageLoader('pyopenadr', 'templates'))
+TEMPLATES = Environment(loader=PackageLoader('openleadr', 'templates'))
 TEMPLATES.filters['datetimeformat'] = datetimeformat
 TEMPLATES.filters['timedeltaformat'] = timedeltaformat
 TEMPLATES.filters['booleanformat'] = booleanformat

+ 2 - 2
pyopenadr/server.py

@@ -15,8 +15,8 @@
 # limitations under the License.
 
 from aiohttp import web
-from pyopenadr.service import EventService, PollService, RegistrationService, ReportService, OptService, VTNService
-from pyopenadr.messaging import create_message, parse_message
+from openleadr.service import EventService, PollService, RegistrationService, ReportService, OptService, VTNService
+from openleadr.messaging import create_message, parse_message
 from functools import partial
 
 class OpenADRServer:

+ 1 - 1
pyopenadr/utils.py

@@ -22,7 +22,7 @@ from collections import OrderedDict
 import itertools
 import re
 
-from pyopenadr import config
+from openleadr import config
 
 DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ"
 DATETIME_FORMAT_NO_MICROSECONDS = "%Y-%m-%dT%H:%M:%SZ"

+ 5 - 5
setup.py

@@ -23,12 +23,12 @@ with open("README.md", "r") as fh:
 with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'VERSION')) as file:
     VERSION = file.read().strip()
 
-setup(name="pyopenadr",
+setup(name='openleadr',
       version=VERSION,
-      description="Python library for dealing with OpenADR",
+      description='Python library for dealing with OpenADR',
       long_description=long_description,
-      long_description_content_type="text/markdown",
-      url="https://finetuned.nl/pyopenadr",
-      packages=['pyopenadr', 'pyopenadr.service'],
+      long_description_content_type='text/markdown',
+      url='https://openleadr.elaad.io',
+      packages=['openleadr', 'openleadr.service'],
       include_package_data=True,
       install_requires=['xmltodict', 'aiohttp', 'apscheduler', 'jinja2', 'signxml-openadr>2.8.0'])

+ 3 - 3
test/conformance/test_conformance_001.py

@@ -16,9 +16,9 @@
 
 import pytest
 
-from pyopenadr import OpenADRClient, OpenADRServer, enums
-from pyopenadr.utils import generate_id
-from pyopenadr.messaging import create_message, parse_message
+from openleadr import OpenADRClient, OpenADRServer, enums
+from openleadr.utils import generate_id
+from openleadr.messaging import create_message, parse_message
 from datetime import datetime, timezone, timedelta
 
 

+ 3 - 3
test/conformance/test_conformance_002.py

@@ -16,9 +16,9 @@
 
 import pytest
 
-from pyopenadr import OpenADRClient, OpenADRServer, enums
-from pyopenadr.utils import generate_id
-from pyopenadr.messaging import create_message, parse_message
+from openleadr import OpenADRClient, OpenADRServer, enums
+from openleadr.utils import generate_id
+from openleadr.messaging import create_message, parse_message
 from datetime import datetime, timezone, timedelta
 
 from pprint import pprint

+ 4 - 4
test/conformance/test_conformance_006.py

@@ -16,9 +16,9 @@
 
 import pytest
 
-from pyopenadr import OpenADRClient, OpenADRServer, enums
-from pyopenadr.utils import generate_id
-from pyopenadr.messaging import create_message, parse_message
+from openleadr import OpenADRClient, OpenADRServer, enums
+from openleadr.utils import generate_id
+from openleadr.messaging import create_message, parse_message
 from datetime import datetime, timezone, timedelta
 
 from pprint import pprint
@@ -32,7 +32,7 @@ async def test_conformance_006():
     """
 
     # Monkey patch our own formatter to prevent an error being raised
-    from pyopenadr.messaging import TEMPLATES
+    from openleadr.messaging import TEMPLATES
     def booleanformat_monkey(value):
         """
         Format a boolean value

+ 3 - 3
test/conformance/test_conformance_008.py

@@ -16,9 +16,9 @@
 
 import pytest
 
-from pyopenadr import OpenADRClient, OpenADRServer, enums
-from pyopenadr.utils import generate_id
-from pyopenadr.messaging import create_message, parse_message
+from openleadr import OpenADRClient, OpenADRServer, enums
+from openleadr.utils import generate_id
+from openleadr.messaging import create_message, parse_message
 from datetime import datetime, timezone, timedelta
 
 from pprint import pprint

+ 3 - 3
test/conformance/test_conformance_009.py

@@ -16,9 +16,9 @@
 
 import pytest
 
-from pyopenadr import OpenADRClient, OpenADRServer, enums
-from pyopenadr.utils import generate_id
-from pyopenadr.messaging import create_message, parse_message
+from openleadr import OpenADRClient, OpenADRServer, enums
+from openleadr.utils import generate_id
+from openleadr.messaging import create_message, parse_message
 from datetime import datetime, timezone, timedelta
 
 from pprint import pprint

+ 3 - 3
test/conformance/test_conformance_014.py

@@ -16,9 +16,9 @@
 
 import pytest
 
-from pyopenadr import OpenADRClient, OpenADRServer, enums
-from pyopenadr.utils import generate_id
-from pyopenadr.messaging import create_message, parse_message
+from openleadr import OpenADRClient, OpenADRServer, enums
+from openleadr.utils import generate_id
+from openleadr.messaging import create_message, parse_message
 from datetime import datetime, timezone, timedelta
 
 from pprint import pprint

+ 4 - 4
test/conformance/test_conformance_021.py

@@ -16,10 +16,10 @@
 
 import pytest
 
-from pyopenadr import OpenADRClient, OpenADRServer, enums
-from pyopenadr.utils import generate_id
-from pyopenadr.messaging import create_message, parse_message
-from pyopenadr.objects import Event, EventDescriptor, ActivePeriod, EventSignal, Interval
+from openleadr import OpenADRClient, OpenADRServer, enums
+from openleadr.utils import generate_id
+from openleadr.messaging import create_message, parse_message
+from openleadr.objects import Event, EventDescriptor, ActivePeriod, EventSignal, Interval
 from datetime import datetime, timezone, timedelta
 
 from pprint import pprint

+ 3 - 3
test/fixtures/simple_server.py

@@ -14,9 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from pyopenadr import OpenADRClient, OpenADRServer, enums
-from pyopenadr.utils import generate_id, normalize_dict, timedeltaformat, datetimeformat, booleanformat
-from pyopenadr.messaging import create_message, parse_message
+from openleadr import OpenADRClient, OpenADRServer, enums
+from openleadr.utils import generate_id, normalize_dict, timedeltaformat, datetimeformat, booleanformat
+from openleadr.messaging import create_message, parse_message
 from datetime import datetime, timezone, timedelta
 
 import asyncio

+ 3 - 3
test/integration_tests/test_client_registration.py

@@ -14,9 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from pyopenadr import OpenADRClient, OpenADRServer, enums
-from pyopenadr.utils import generate_id
-from pyopenadr.messaging import create_message, parse_message
+from openleadr import OpenADRClient, OpenADRServer, enums
+from openleadr.utils import generate_id, certificate_fingerprint
+from openleadr.messaging import create_message, parse_message
 from datetime import datetime, timezone, timedelta
 
 import asyncio

+ 3 - 3
test/test_message_conversion.py

@@ -14,9 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from pyopenadr.utils import generate_id
-from pyopenadr.messaging import create_message, parse_message
-from pyopenadr import enums
+from openleadr.utils import generate_id
+from openleadr.messaging import create_message, parse_message
+from openleadr import enums
 from pprint import pprint
 from termcolor import colored
 from datetime import datetime, timezone, timedelta

+ 4 - 4
test/test_schema.py

@@ -14,9 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from pyopenadr.utils import generate_id, indent_xml
-from pyopenadr.messaging import create_message
-from pyopenadr import enums
+from openleadr.utils import generate_id, indent_xml
+from openleadr.messaging import create_message
+from openleadr import enums
 from lxml import etree
 import os
 from datetime import datetime, timedelta, timezone
@@ -91,7 +91,7 @@ def _test_message(msg_type, **payload):
             # print("", file=file)
             # print(indent_xml(message), file=file)
             # print("", file=file)
-            # print("pyOpenADR representation:", file=file)
+            # print("openleadr representation:", file=file)
             # print("..code-block:python3", file=file)
             # print("", file=file)
             # pprint(payload, stream=file)

+ 2 - 2
test/test_signatures.py

@@ -15,8 +15,8 @@
 # limitations under the License.
 
 
-from pyopenadr.utils import generate_id
-from pyopenadr.messaging import create_message, parse_message
+from openleadr.utils import generate_id, certificate_fingerprint
+from openleadr.messaging import create_message, parse_message
 from hashlib import sha256
 from base64 import b64encode
 from datetime import datetime, timedelta, timezone