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

Fixes #1650: Added the version field to the site entity #1717

Merged
merged 2 commits into from
Jan 17, 2025
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
6 changes: 6 additions & 0 deletions python/skupper_router/management/skrouter.json
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,12 @@
"required": false,
"create": true
},
"version": {
"description":"Build version of the running control-plane software",
"type": "string",
"required": false,
"create": true
},
"platform": {
"description":"Description of the platform on which the site is deployed. Examples are Kubernetes, Docker, Podman, Linux, etc.",
"type": "string",
Expand Down
3 changes: 3 additions & 0 deletions src/vanflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -2157,6 +2157,7 @@ QD_EXPORT qd_error_t qd_dispatch_configure_site(qd_dispatch_t *qd, qd_entity_t *
char *provider = qd_entity_opt_string(entity, "provider", 0);
char *platform = qd_entity_opt_string(entity, "platform", 0);
char *namespace = qd_entity_opt_string(entity, "namespace", 0);
char *version = qd_entity_opt_string(entity, "version", 0);

if (qd_error_code() == QD_ERROR_NONE) {
vflow_record_t *site;
Expand All @@ -2168,6 +2169,7 @@ QD_EXPORT qd_error_t qd_dispatch_configure_site(qd_dispatch_t *qd, qd_entity_t *
}

if (name) vflow_set_string(site, VFLOW_ATTRIBUTE_NAME, name);
if (version) vflow_set_string(site, VFLOW_ATTRIBUTE_BUILD_VERSION, version);
if (location) vflow_set_string(site, VFLOW_ATTRIBUTE_LOCATION, location);
if (provider) vflow_set_string(site, VFLOW_ATTRIBUTE_PROVIDER, provider);
if (platform) vflow_set_string(site, VFLOW_ATTRIBUTE_PLATFORM, platform);
Expand All @@ -2179,6 +2181,7 @@ QD_EXPORT qd_error_t qd_dispatch_configure_site(qd_dispatch_t *qd, qd_entity_t *
free(provider);
free(platform);
free(namespace);
free(version);

return qd_error_code();
}
Expand Down
Loading