diff --git a/Cargo.lock b/Cargo.lock index 6adde30b8..f3f575d7f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -333,7 +333,7 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "agent" -version = "0.10.9" +version = "0.10.10" dependencies = [ "akri-debug-echo", "akri-discovery-utils", @@ -402,7 +402,7 @@ dependencies = [ [[package]] name = "akri-debug-echo" -version = "0.10.9" +version = "0.10.10" dependencies = [ "akri-discovery-utils", "akri-shared", @@ -422,7 +422,7 @@ dependencies = [ [[package]] name = "akri-discovery-utils" -version = "0.10.9" +version = "0.10.10" dependencies = [ "akri-shared", "anyhow", @@ -444,7 +444,7 @@ dependencies = [ [[package]] name = "akri-onvif" -version = "0.10.9" +version = "0.10.10" dependencies = [ "akri-discovery-utils", "akri-shared", @@ -472,7 +472,7 @@ dependencies = [ [[package]] name = "akri-opcua" -version = "0.10.9" +version = "0.10.10" dependencies = [ "akri-discovery-utils", "akri-shared", @@ -496,7 +496,7 @@ dependencies = [ [[package]] name = "akri-shared" -version = "0.10.9" +version = "0.10.10" dependencies = [ "anyhow", "async-trait", @@ -525,7 +525,7 @@ dependencies = [ [[package]] name = "akri-udev" -version = "0.10.9" +version = "0.10.10" dependencies = [ "akri-discovery-utils", "anyhow", @@ -1043,7 +1043,7 @@ checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" [[package]] name = "controller" -version = "0.10.9" +version = "0.10.10" dependencies = [ "akri-shared", "anyhow", @@ -1243,7 +1243,7 @@ dependencies = [ [[package]] name = "debug-echo-discovery-handler" -version = "0.10.9" +version = "0.10.10" dependencies = [ "akri-debug-echo", "akri-discovery-utils", @@ -2540,7 +2540,7 @@ checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "onvif-discovery-handler" -version = "0.10.9" +version = "0.10.10" dependencies = [ "akri-discovery-utils", "akri-onvif", @@ -2590,7 +2590,7 @@ dependencies = [ [[package]] name = "opcua-discovery-handler" -version = "0.10.9" +version = "0.10.10" dependencies = [ "akri-discovery-utils", "akri-opcua", @@ -4206,7 +4206,7 @@ dependencies = [ [[package]] name = "udev-discovery-handler" -version = "0.10.9" +version = "0.10.10" dependencies = [ "akri-discovery-utils", "akri-udev", @@ -4217,7 +4217,7 @@ dependencies = [ [[package]] name = "udev-video-broker" -version = "0.10.9" +version = "0.10.10" dependencies = [ "akri-shared", "env_logger", @@ -4494,7 +4494,7 @@ dependencies = [ [[package]] name = "webhook-configuration" -version = "0.10.9" +version = "0.10.10" dependencies = [ "actix", "actix-rt 2.7.0", diff --git a/agent/Cargo.toml b/agent/Cargo.toml index 45fd623b7..c485ad79b 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "agent" -version = "0.10.9" +version = "0.10.10" authors = ["Kate Goldenring ", ""] edition = "2018" rust-version = "1.68.1" diff --git a/controller/Cargo.toml b/controller/Cargo.toml index c6a965ece..d1b1a5c22 100644 --- a/controller/Cargo.toml +++ b/controller/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "controller" -version = "0.10.9" +version = "0.10.10" authors = ["", ""] edition = "2018" rust-version = "1.68.1" diff --git a/deployment/helm/Chart.yaml b/deployment/helm/Chart.yaml index a216c6e97..795f8de65 100644 --- a/deployment/helm/Chart.yaml +++ b/deployment/helm/Chart.yaml @@ -15,9 +15,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.10.9 +version: 0.10.10 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 0.10.9 +appVersion: 0.10.10 diff --git a/discovery-handler-modules/debug-echo-discovery-handler/Cargo.toml b/discovery-handler-modules/debug-echo-discovery-handler/Cargo.toml index ce9e80cd4..6a898bdef 100644 --- a/discovery-handler-modules/debug-echo-discovery-handler/Cargo.toml +++ b/discovery-handler-modules/debug-echo-discovery-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "debug-echo-discovery-handler" -version = "0.10.9" +version = "0.10.10" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.68.1" diff --git a/discovery-handler-modules/onvif-discovery-handler/Cargo.toml b/discovery-handler-modules/onvif-discovery-handler/Cargo.toml index b0bfcdeb0..3e81f9418 100644 --- a/discovery-handler-modules/onvif-discovery-handler/Cargo.toml +++ b/discovery-handler-modules/onvif-discovery-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "onvif-discovery-handler" -version = "0.10.9" +version = "0.10.10" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.68.1" diff --git a/discovery-handler-modules/opcua-discovery-handler/Cargo.toml b/discovery-handler-modules/opcua-discovery-handler/Cargo.toml index 5846a6b6b..1a0d7d17b 100644 --- a/discovery-handler-modules/opcua-discovery-handler/Cargo.toml +++ b/discovery-handler-modules/opcua-discovery-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "opcua-discovery-handler" -version = "0.10.9" +version = "0.10.10" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.68.1" diff --git a/discovery-handler-modules/udev-discovery-handler/Cargo.toml b/discovery-handler-modules/udev-discovery-handler/Cargo.toml index 715f6db6d..28066374b 100644 --- a/discovery-handler-modules/udev-discovery-handler/Cargo.toml +++ b/discovery-handler-modules/udev-discovery-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "udev-discovery-handler" -version = "0.10.9" +version = "0.10.10" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.68.1" diff --git a/discovery-handlers/debug-echo/Cargo.toml b/discovery-handlers/debug-echo/Cargo.toml index 950e66f8c..9f7ce8f2c 100644 --- a/discovery-handlers/debug-echo/Cargo.toml +++ b/discovery-handlers/debug-echo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "akri-debug-echo" -version = "0.10.9" +version = "0.10.10" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.68.1" diff --git a/discovery-handlers/onvif/Cargo.toml b/discovery-handlers/onvif/Cargo.toml index 9cb33c526..2fb4e2855 100644 --- a/discovery-handlers/onvif/Cargo.toml +++ b/discovery-handlers/onvif/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "akri-onvif" -version = "0.10.9" +version = "0.10.10" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.68.1" diff --git a/discovery-handlers/onvif/src/discovery_handler.rs b/discovery-handlers/onvif/src/discovery_handler.rs index 2a92356f5..aeb228902 100644 --- a/discovery-handlers/onvif/src/discovery_handler.rs +++ b/discovery-handlers/onvif/src/discovery_handler.rs @@ -350,6 +350,34 @@ mod tests { .is_none()); } + #[tokio::test] + async fn test_apply_filters_include_ip_similar() { + let mock_uri = "device_uri"; + + let mut mock = MockOnvifQuery::new(); + configure_scenario( + &mut mock, + Some(IpAndMac { + mock_uri, + mock_ip: "mock.ip", + mock_mac: "mock:mac", + }), + ); + + let onvif_config = OnvifDiscoveryDetails { + ip_addresses: Some(FilterList { + action: FilterType::Include, + items: vec!["mock.i".to_string()], + }), + mac_addresses: None, + scopes: None, + discovery_timeout_seconds: 1, + }; + assert!(apply_filters(&onvif_config, mock_uri, &mock) + .await + .is_none()); + } + #[tokio::test] async fn test_apply_filters_exclude_ip_nonexist() { let mock_uri = "device_uri"; @@ -409,6 +437,36 @@ mod tests { .is_none()); } + #[tokio::test] + async fn test_apply_filters_exclude_ip_similar() { + let mock_uri = "device_uri"; + let mock_ip = "mock.ip"; + let mock_mac = "mock:mac"; + + let mut mock = MockOnvifQuery::new(); + configure_scenario( + &mut mock, + Some(IpAndMac { + mock_uri, + mock_ip, + mock_mac, + }), + ); + + let onvif_config = OnvifDiscoveryDetails { + ip_addresses: Some(FilterList { + action: FilterType::Exclude, + items: vec!["mock.i".to_string()], + }), + mac_addresses: None, + scopes: None, + discovery_timeout_seconds: 1, + }; + let instance = apply_filters(&onvif_config, mock_uri, &mock).await.unwrap(); + + assert_eq!(expected_device(mock_uri, mock_ip, mock_mac), instance); + } + #[tokio::test] async fn test_apply_filters_include_mac_exist() { let mock_uri = "device_uri"; diff --git a/discovery-handlers/onvif/src/discovery_impl.rs b/discovery-handlers/onvif/src/discovery_impl.rs index 0454a3382..af2405f31 100644 --- a/discovery-handlers/onvif/src/discovery_impl.rs +++ b/discovery-handlers/onvif/src/discovery_impl.rs @@ -242,7 +242,7 @@ pub mod util { .filter(|pattern| { filter_against .iter() - .filter(|filter_against_item| filter_against_item.contains(*pattern)) + .filter(|filter_against_item| filter_against_item == pattern) .count() > 0 }) diff --git a/discovery-handlers/opcua/Cargo.toml b/discovery-handlers/opcua/Cargo.toml index d777b5321..026128b60 100644 --- a/discovery-handlers/opcua/Cargo.toml +++ b/discovery-handlers/opcua/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "akri-opcua" -version = "0.10.9" +version = "0.10.10" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.68.1" diff --git a/discovery-handlers/udev/Cargo.toml b/discovery-handlers/udev/Cargo.toml index 40423b77f..ee6f68aec 100644 --- a/discovery-handlers/udev/Cargo.toml +++ b/discovery-handlers/udev/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "akri-udev" -version = "0.10.9" +version = "0.10.10" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.68.1" diff --git a/discovery-utils/Cargo.toml b/discovery-utils/Cargo.toml index be7cd0fcf..5d6217bbf 100644 --- a/discovery-utils/Cargo.toml +++ b/discovery-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "akri-discovery-utils" -version = "0.10.9" +version = "0.10.10" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.68.1" diff --git a/samples/brokers/udev-video-broker/Cargo.toml b/samples/brokers/udev-video-broker/Cargo.toml index 879a02f9d..40a6fa683 100644 --- a/samples/brokers/udev-video-broker/Cargo.toml +++ b/samples/brokers/udev-video-broker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "udev-video-broker" -version = "0.10.9" +version = "0.10.10" authors = ["Kate Goldenring ", ""] edition = "2018" rust-version = "1.68.1" diff --git a/shared/Cargo.toml b/shared/Cargo.toml index dfffa2395..ded98dbe1 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "akri-shared" -version = "0.10.9" +version = "0.10.10" authors = [""] edition = "2018" rust-version = "1.68.1" diff --git a/version.txt b/version.txt index f314d0202..ddf1d4ae6 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.10.9 +0.10.10 diff --git a/webhooks/validating/configuration/Cargo.toml b/webhooks/validating/configuration/Cargo.toml index 88df10125..653770c5e 100644 --- a/webhooks/validating/configuration/Cargo.toml +++ b/webhooks/validating/configuration/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "webhook-configuration" -version = "0.10.9" +version = "0.10.10" authors = ["DazWilkin "] edition = "2018" rust-version = "1.68.1"