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

FOGL-8015 removed gcp references #1242

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion docs/plugin_developers_guide/09_packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ Common Additional Libraries Package
Below are the packages which created a part of the process of building Fledge that are commonly used in plugins.

- **fledge-mqtt** which is a packaged version of the libpaho-mqtt library.
- **fledge-gcp** which is a packaged version of the libjwt and libjansson libraries.
- **fledge-iec** which is a packaged version of the IEC 60870 and IEC 61850 libraries.
- **fledge-s2opcua** which is a packaged version of libexpat and libs2opc libraries.

Expand Down
19 changes: 10 additions & 9 deletions docs/plugin_developers_guide/10_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ and their versions.
"name": "http_north",
"type": "north",
"description": "HTTP North Plugin",
"version": "1.8.1",
"version": "2.2.0",
"installedDirectory": "north/http_north",
"packageName": "fledge-north-http-north"
},
{
"name": "GCP",
"name": "Kafka",
"type": "north",
"description": "Google Cloud Platform IoT-Core",
"version": "1.8.1",
"installedDirectory": "north/GCP",
"packageName": "fledge-north-gcp"
"description": "Simple plugin to send data to Kafka topic",
"version": "2.2.0",
"installedDirectory": "north/Kafka",
"packageName": "fledge-north-kafka"
},
...
}
Expand Down Expand Up @@ -118,16 +118,17 @@ and the function to call, usually *plugin_info*.

.. code-block:: console

$ get_plugin_info plugins/north/GCP/libGCP.so plugin_info
{"name": "GCP", "version": "1.8.1", "type": "north", "interface": "1.0.0", "flag": 0, "config": { "plugin" : { "description" : "Google Cloud Platform IoT-Core", "type" : "string", "default" : "GCP", "readonly" : "true" }, "project_id" : { "description" : "The GCP IoT Core Project ID", "type" : "string", "default" : "", "order" : "1", "displayName" : "Project ID" }, "region" : { "description" : "The GCP Region", "type" : "enumeration", "options" : [ "us-central1", "europe-west1", "asia-east1" ], "default" : "us-central1", "order" : "2", "displayName" : "The GCP Region" }, "registry_id" : { "description" : "The Registry ID of the GCP Project", "type" : "string", "default" : "", "order" : "3", "displayName" : "Registry ID" }, "device_id" : { "description" : "Device ID within GCP IoT Core", "type" : "string", "default" : "", "order" : "4", "displayName" : "Device ID" }, "key" : { "description" : "Name of the key file to use", "type" : "string", "default" : "", "order" : "5", "displayName" : "Key Name" }, "algorithm" : { "description" : "JWT algorithm", "type" : "enumeration", "options" : [ "ES256", "RS256" ], "default" : "RS256", "order" : "6", "displayName" : "JWT Algorithm" }, "source": { "description" : "The source of data to send", "type" : "enumeration", "default" : "readings", "order" : "8", "displayName" : "Data Source", "options" : ["readings", "statistics"] } }}
$ ./get_plugin_info /usr/local/fledge/plugins/north/Kafka/libKafka.so plugin_info
{"name": "Kafka", "type": "north", "flag": 0, "version": "2.2.0", "interface": "1.0.0", "config": {"SSL_CERT": {"displayName": "Certificate Name", "description": "Name of client certificate for identity authentications", "default": "", "validity": "KafkaSecurityProtocol == \"SSL\" || KafkaSecurityProtocol == \"SASL_SSL\"", "group": "Encryption", "type": "string", "order": "10"}, "topic": {"mandatory": "true", "description": "The topic to send reading data on", "default": "Fledge", "displayName": "Kafka Topic", "type": "string", "order": "2"}, "brokers": {"displayName": "Bootstrap Brokers", "description": "The bootstrap broker list to retrieve full Kafka brokers", "default": "localhost:9092,kafka.local:9092", "mandatory": "true", "type": "string", "order": "1"}, "KafkaUserID": {"group": "Authentication", "description": "User ID to be used with SASL_PLAINTEXT security protocol", "default": "user", "validity": "KafkaSecurityProtocol == \"SASL_PLAINTEXT\" || KafkaSecurityProtocol == \"SASL_SSL\"", "displayName": "User ID", "type": "string", "order": "7"}, "KafkaSASLMechanism": {"group": "Authentication", "description": "Authentication mechanism to be used to connect to kafka broker", "default": "PLAIN", "displayName": "SASL Mechanism", "type": "enumeration", "order": "6", "validity": "KafkaSecurityProtocol == \"SASL_PLAINTEXT\" || KafkaSecurityProtocol == \"SASL_SSL\"", "options": ["PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512"]}, "SSL_Password": {"displayName": "Certificate Password", "description": "Optional: Password to be used when loading the certificate chain", "default": "", "validity": "KafkaSecurityProtocol == \"SSL\" || KafkaSecurityProtocol == \"SASL_SSL\"", "group": "Encryption", "type": "password", "order": "12"}, "compression": {"displayName": "Compression Codec", "description": "The compression codec to be used to send data to the Kafka broker", "default": "none", "order": "4", "type": "enumeration", "options": ["none", "gzip", "snappy", "lz4"]}, "plugin": {"default": "Kafka", "readonly": "true", "type": "string", "description": "Simple plugin to send data to a Kafka topic"}, "KafkaSecurityProtocol": {"group": "Authentication", "description": "Security protocol to be used to connect to kafka broker", "default": "PLAINTEXT", "options": ["PLAINTEXT", "SASL_PLAINTEXT", "SSL", "SASL_SSL"], "displayName": "Security Protocol", "type": "enumeration", "order": "5"}, "source": {"displayName": "Data Source", "description": "The source of data to send", "default": "readings", "order": "13", "type": "enumeration", "options": ["readings", "statistics"]}, "json": {"displayName": "Send JSON", "description": "Send as JSON objects or as strings", "default": "Strings", "order": "3", "type": "enumeration", "options": ["Objects", "Strings"]}, "SSL_CA_File": {"displayName": "Root CA Name", "description": "Name of the root certificate authority that will be used to verify the certificate", "default": "", "validity": "KafkaSecurityProtocol == \"SSL\" || KafkaSecurityProtocol == \"SASL_SSL\"", "group": "Encryption", "type": "string", "order": "9"}, "SSL_Keyfile": {"displayName": "Private Key Name", "description": "Name of client private key required for communication", "default": "", "validity": "KafkaSecurityProtocol == \"SSL\" || KafkaSecurityProtocol == \"SASL_SSL\"", "group": "Encryption", "type": "string", "order": "11"}, "KafkaPassword": {"group": "Authentication", "description": "Password to be used with SASL_PLAINTEXT security protocol", "default": "pass", "validity": "KafkaSecurityProtocol == \"SASL_PLAINTEXT\" || KafkaSecurityProtocol == \"SASL_SSL\"", "displayName": "Password", "type": "password", "order": "8"}}}


If there is an undefined symbol you will get an error from this
utility. You can also check the validity of your JSON configuration by
piping the output to a program such as jq.

.. code-block:: console

$ get_plugin_info plugins/south/Random/libRandom.so plugin_info | jq
$ ./get_plugin_info plugins/south/Random/libRandom.so plugin_info | jq
{
"name": "Random",
"version": "1.9.2",
Expand Down
46 changes: 0 additions & 46 deletions tests/system/python/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,17 +904,6 @@ def pytest_addoption(parser):
parser.addoption("--exclude-packages-list", action="store", default="None",
help="Packages to be excluded from test e.g. --exclude-packages-list=fledge-south-sinusoid,fledge-filter-log")

# GCP config
parser.addoption("--gcp-project-id", action="store", default="nomadic-groove-264509", help="GCP Project ID")
parser.addoption("--gcp-registry-id", action="store", default="fl-nerd--registry", help="GCP Registry ID")
parser.addoption("--gcp-device-gateway-id", action="store", default="fl-nerd-gateway", help="GCP Device ID")
parser.addoption("--gcp-subscription-name", action="store", default="my-subscription", help="GCP Subscription name")
parser.addoption("--google-app-credentials", action="store", help="GCP JSON credentials file path")
parser.addoption("--gcp-cert-path", action="store", default="./data/gcp/rsa_private.pem",
help="GCP certificate path")
parser.addoption("--gcp-logger-name", action="store", default="cloudfunctions.googleapis.com%2Fcloud-functions",
help="GCP Logger name")

# Config required for testing fledge under impaired network.

parser.addoption("--south-service-wait-time", action="store", type=int, default=20,
Expand Down Expand Up @@ -1182,41 +1171,6 @@ def package_build_source_list(request):
return request.config.getoption("--package-build-source-list")


@pytest.fixture
def gcp_project_id(request):
return request.config.getoption("--gcp-project-id")


@pytest.fixture
def gcp_registry_id(request):
return request.config.getoption("--gcp-registry-id")


@pytest.fixture
def gcp_device_gateway_id(request):
return request.config.getoption("--gcp-device-gateway-id")


@pytest.fixture
def gcp_subscription_name(request):
return request.config.getoption("--gcp-subscription-name")


@pytest.fixture
def google_app_credentials(request):
return request.config.getoption("--google-app-credentials")


@pytest.fixture
def gcp_cert_path(request):
return request.config.getoption("--gcp-cert-path")


@pytest.fixture
def gcp_logger_name(request):
return request.config.getoption("--gcp-logger-name")


@pytest.fixture
def exclude_packages_list(request):
return request.config.getoption("--exclude-packages-list")
Expand Down
234 changes: 0 additions & 234 deletions tests/system/python/packages/test_gcp_gateway.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ async def mock_coro():
return {"rows": [{'id': 'b57fd5c5-8079-49ff-b6a1-9515cbd259e4', 'name': 'fledge-south-random',
'action': "install", 'status': -1,
'log_file_uri': 'log/201006-17-02-53-fledge-south-random-install.log'},
{'id': '1cd38675-fea8-4783-b3b5-463ed6c8cbe8', 'name': 'fledge-north-gcp',
{'id': '1cd38675-fea8-4783-b3b5-463ed6c8cbe8', 'name': 'fledge-north-kafka',
'action': "install", 'status': 0,
'log_file_uri': 'log/201007-01-02-53-fledge-north-gcp-install.log'},
'log_file_uri': 'log/201007-01-02-53-fledge-north-kafka-install.log'},
{'id': '63f3c84b-0cbf-4c76-b9bf-848779fbcc6f', 'name': 'fledge-filter-fft',
'action': "update", 'status': 127,
'log_file_uri': 'log/201006-12-02-12-fledge-filter-fft-update.log'},
Expand Down