Skip to content

Commit

Permalink
Fixes #1650: Added the version field to the site entity (#1717)
Browse files Browse the repository at this point in the history
* Fixes #1650: Added the version field to the site entity

* Fixed description for version attribute in site entity
  • Loading branch information
ganeshmurthy authored Jan 17, 2025
1 parent 5364b06 commit 1fb1a72
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
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

0 comments on commit 1fb1a72

Please sign in to comment.