Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IS 12] Validate Get/Set/Add/Remove/Find methods #822

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b7ab7c6
Since jstasiak/zeroconf#666 (0.32.0) it needs a much much smaller mon…
garethsb May 24, 2023
aa58b5e
Merge pull request #812 from AMWA-TV/zeroconf-marmoset
garethsb Jun 28, 2023
858ec15
Fixed error reporting
jonathan-r-thorpe Jul 18, 2023
4732629
Added Set user label test
jonathan-r-thorpe Jul 18, 2023
655b4a1
Validate touchpoints
jonathan-r-thorpe Jul 18, 2023
fb85eb3
Validate NcTouchpointNmos or NcTouchpointNmosChannelMapping depending…
jonathan-r-thorpe Jul 18, 2023
fa0a51b
Sequence command JSON helper functions
jonathan-r-thorpe Jul 19, 2023
9935489
Check sequence manipulation functions
jonathan-r-thorpe Jul 19, 2023
1901106
Build device model object tree when validating device model
jonathan-r-thorpe Jul 20, 2023
3761bab
Merge pull request #812 from AMWA-TV/zeroconf-marmoset
garethsb Jun 28, 2023
49f968a
Recursively check each block's role paths
jonathan-r-thorpe Jul 21, 2023
954d123
find members by role test
jonathan-r-thorpe Jul 21, 2023
e6b7f5c
Find members by class id test
jonathan-r-thorpe Jul 21, 2023
94aaedd
GetMemberDescriptors test
jonathan-r-thorpe Jul 24, 2023
d1890c6
removed protocolVersion
jonathan-r-thorpe Jul 27, 2023
b872ad2
GetSequenceLength test
jonathan-r-thorpe Jul 27, 2023
a64beef
Moved IS-12 command support into IS12Utils
jonathan-r-thorpe Jul 27, 2023
3f17d6b
Refactored command execution
jonathan-r-thorpe Jul 27, 2023
d185e9c
replaced protocol def dict with enumerations
jonathan-r-thorpe Jul 27, 2023
8c7e295
Renamed and reordered tests
jonathan-r-thorpe Jul 28, 2023
debcbcb
Set GetSequenceLength checked flag
jonathan-r-thorpe Jul 28, 2023
264453f
Subscription message
jonathan-r-thorpe Jul 28, 2023
46b2d17
Subscriptions and notifications
jonathan-r-thorpe Jul 28, 2023
3956ee2
Subscribe to all objects and test changing all user labels
jonathan-r-thorpe Jul 31, 2023
921190b
Improve error reporting
jonathan-r-thorpe Jul 31, 2023
ef9006a
handle null descriptions
jonathan-r-thorpe Jul 31, 2023
bc24b1e
Bug fix - now won't ignore description field in NcDescriptor
jonathan-r-thorpe Jul 31, 2023
884da90
Fix flake8/pycodestyle E721 do not compare types
garethsb Aug 1, 2023
f7acf39
Fix flake8/pycodestyle E721 do not compare types (#825)
garethsb Aug 1, 2023
c51a42b
Add ClassManager class
jonathan-r-thorpe Aug 1, 2023
42bae13
Add Class Manager method tests
jonathan-r-thorpe Aug 1, 2023
814e6d8
Factor out querying of class manager
jonathan-r-thorpe Aug 1, 2023
7aa05b2
Tidy up querying of class manager and device model
jonathan-r-thorpe Aug 1, 2023
5531ca8
Refactored validate device model
jonathan-r-thorpe Aug 1, 2023
4a26c82
Handle null sequences. Renamed some parameters
jonathan-r-thorpe Aug 2, 2023
0674217
Created NcBlock object for queried device model
jonathan-r-thorpe Aug 2, 2023
69a0962
Fixed get_role_paths. Added get_oids
jonathan-r-thorpe Aug 2, 2023
c9132a7
Added illegal and invalid oid tests
jonathan-r-thorpe Aug 2, 2023
7714d4b
Added illegal command handle test
jonathan-r-thorpe Aug 2, 2023
9b9cda6
IndexOutOfBounds test. WebSocket kept open test
jonathan-r-thorpe Aug 2, 2023
a7e22fb
Renumbered tests. Added comments
jonathan-r-thorpe Aug 2, 2023
df03b27
Updated comment
jonathan-r-thorpe Aug 2, 2023
ac0e39d
Simplify querying of managers from device model
jonathan-r-thorpe Aug 3, 2023
4bb4efb
Removed redundant oid test
jonathan-r-thorpe Aug 3, 2023
a6893ce
Merge branch 'master' into is-12-validate-methods
jonathan-r-thorpe Aug 4, 2023
6af4df6
correct linting error
jonathan-r-thorpe Aug 4, 2023
4dabde7
Move get_manager out of NcBlock
jonathan-r-thorpe Aug 4, 2023
ebe162e
Updated comments and links to specification
jonathan-r-thorpe Aug 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
559 changes: 481 additions & 78 deletions nmostesting/IS12Utils.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion nmostesting/NMOSTesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
from .mocks.Registry import NUM_REGISTRIES, REGISTRIES, REGISTRY_API
from .mocks.System import NUM_SYSTEMS, SYSTEMS, SYSTEM_API
from .mocks.Auth import AUTH_API, PRIMARY_AUTH, SECONDARY_AUTH
from zeroconf_monkey import Zeroconf
from zeroconf import Zeroconf

# Make ANSI escape character sequences (for producing coloured terminal text) work under Windows
try:
Expand Down
2 changes: 1 addition & 1 deletion nmostesting/mocks/Auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from ..Config import PORT_BASE, KEYS_MOCKS, ENABLE_HTTPS, CERT_TRUST_ROOT_CA, JWKS_URI, REDIRECT_URI, SCOPE, CACHE_PATH
from ..TestHelper import get_default_ip, get_mocks_hostname, load_resolved_schema, check_content_type
from ..IS10Utils import IS10Utils
from zeroconf_monkey import ServiceInfo
from zeroconf import ServiceInfo
from enum import Enum
from werkzeug.serving import make_server
from http import HTTPStatus
Expand Down
6 changes: 5 additions & 1 deletion nmostesting/suites/IS0401Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@
from copy import deepcopy
from collections import defaultdict
from pathlib import Path
from zeroconf_monkey import ServiceBrowser, ServiceInfo, Zeroconf
from zeroconf import ServiceBrowser, ServiceInfo, Zeroconf

from .. import Config as CONFIG
from ..MdnsListener import MdnsListener
from ..GenericTest import GenericTest, NMOSTestException, NMOS_WIKI_URL
from ..IS04Utils import IS04Utils
from ..TestHelper import get_default_ip, is_ip_address, load_resolved_schema, check_content_type

# monkey patch zeroconf to allow us to advertise "_nmos-registration._tcp"
from zeroconf import service_type_name
service_type_name.__kwdefaults__['strict'] = False

NODE_API_KEY = "node"
RECEIVER_CAPS_KEY = "receiver-caps"
CAPS_REGISTER_KEY = "caps-register"
Expand Down
2 changes: 1 addition & 1 deletion nmostesting/suites/IS0402Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from time import sleep
from jsonschema import ValidationError
from urllib.parse import urlparse
from zeroconf_monkey import ServiceBrowser, Zeroconf
from zeroconf import ServiceBrowser, Zeroconf

from .. import Config as CONFIG
from ..MdnsListener import MdnsListener
Expand Down
2 changes: 1 addition & 1 deletion nmostesting/suites/IS0403Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import time
import socket

from zeroconf_monkey import ServiceBrowser, Zeroconf
from zeroconf import ServiceBrowser, Zeroconf
from ..MdnsListener import MdnsListener
from ..GenericTest import GenericTest, NMOS_WIKI_URL
from ..IS04Utils import IS04Utils
Expand Down
2 changes: 1 addition & 1 deletion nmostesting/suites/IS0902Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import time
import socket
from zeroconf_monkey import ServiceInfo, Zeroconf
from zeroconf import ServiceInfo, Zeroconf

from .. import Config as CONFIG
from ..MdnsListener import MdnsListener
Expand Down
2 changes: 1 addition & 1 deletion nmostesting/suites/IS1001Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

from ..GenericTest import GenericTest, NMOSTestException, NMOSInitException
from .. import Config as CONFIG
from zeroconf_monkey import ServiceBrowser, Zeroconf
from zeroconf import ServiceBrowser, Zeroconf
from ..MdnsListener import MdnsListener
from ..TestHelper import check_content_type

Expand Down
1,552 changes: 993 additions & 559 deletions nmostesting/suites/IS1201Test.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
flask>=2.0.0
wtforms
jsonschema
zeroconf-monkey>=1.0.0
zeroconf>=0.32.0
requests
netifaces
gitpython
Expand Down
4 changes: 2 additions & 2 deletions utilities/dut-data-exporter/dutDataExporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def url_port_number(url):
response = requests.get(url)
mac_addresses = response.json()["interfaces"]
for address in mac_addresses:
if type(address["port_id"]) == str:
if isinstance(address["port_id"], str):
address["port_id"] = address["port_id"].replace("-", ":")
if type(address["chassis_id"]) == str:
if isinstance(address["chassis_id"], str):
address["chassis_id"] = address["chassis_id"].replace("-", ":")
node_id = response.json()["id"]
print("Host: {}".format(response.json()["description"]))
Expand Down
Loading