Commit Graph

61 Commits

Author SHA1 Message Date
Valentin Rothberg 8c64c4370f sqlite: move migration after table creation
Otherwise we'll fail immediately as the schema version is returned as 0.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 10:35:48 +01:00
Valentin Rothberg eeabe975ea sqlite: implement pod methods
[NO NEW TESTS NEEDED] - the sqlite backend is still in development and
is not enabled by default.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-02-23 10:35:41 +01:00
Matt Heon 03aaa8d350 Fix an incorrect comment on NewSqliteState
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 19:24:36 -05:00
Matt Heon 59a54f32dc Add support for volume operations to SQLite state
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
Matt Heon c0b92bdbc7 Implement exec session handling in SQL database
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
Matt Heon 627a5b73bf Various fixes from code review
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
Matt Heon 97499a70aa Implement network disconnect for SQLite state
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
Matt Heon 939a4ccef4 Implement Network Connect/Modify for SQLite state
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
Matt Heon 8ab18d8482 Fix various lint issues
Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
Matt Heon b4c4f9c93d Some further work on SQLite state
- Added a mechanism to check schema version and migrate
  (no migrations yet since schema hasn't changed yet).
- Added pod support to AddContainer, and unified AddContainer and
  RemoveContainer between containers and pods.
- Fixed newly-added GetPodName and GetCtrName in BoltDB so they
  only return pod/container names.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00
Matt Heon 1b968c6074 Add initial SQLite-backed state implementation
This contains the implementation of (most) container functions,
with stubs for all pod and volume functions. Presently accessed
via environment variable only for testing purposes.

Signed-off-by: Matt Heon <mheon@redhat.com>
2023-02-22 11:00:50 -05:00