summaryrefslogtreecommitdiffstats
path: root/src/dbi.h
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2024-08-21 20:19:23 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2024-08-21 21:58:48 +0200
commit5eba9f4e1b44fb0d4b4962c2241fe9391e202d7b (patch)
tree1940f98fcf9d24b1046e425b77eddc5bab624ee4 /src/dbi.h
parent4e0f9aac9e2883a992469f5b2b231ecb14b30183 (diff)
rest: allow repository to have more than one IP address
Repository can have more than one single IP address. * Add alias field to database to represent the extra IPs that are attached to the repository, update schema and add version 9. * Use og_dbi_get_repository_ip() to infer the repository IP address. * Add helper functions (src/repo.c) to build a list of repositories and update rest API to use it.
Diffstat (limited to 'src/dbi.h')
-rw-r--r--src/dbi.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/dbi.h b/src/dbi.h
index e16e5d1..81eac3e 100644
--- a/src/dbi.h
+++ b/src/dbi.h
@@ -127,12 +127,6 @@ struct og_folder {
char name[OG_DB_FOLDER_NAME_MAXLEN + 1];
};
-struct og_repository {
- unsigned int center;
- char name[OG_DB_REPO_NAME_MAXLEN];
- char ip[OG_DB_IP_MAXLEN];
-};
-
struct in_addr;
int og_dbi_get_computer_info(struct og_dbi *dbi, struct og_computer *computer,
struct in_addr addr);
@@ -145,6 +139,6 @@ int og_dbi_add_image(struct og_dbi *dbi, struct og_image *image);
int og_dbi_schema_update(void);
int og_dbi_get_repository_ip(const struct og_dbi *dbi, const uint32_t repo_id,
- char *repository_ip);
+ const char *client_ip, char *repository_ip);
#endif