{NULL, NULL, {NULL, NULL, NULL}, {NULL, NULL, NULL}},
};
+static void
+sbctl_init(struct ctl_context *ctx OVS_UNUSED)
+{
+}
+
static void
cmd_chassis_add(struct ctl_context *ctx)
{
\f
static const struct ctl_table_class tables[] = {
+ {&sbrec_table_sb_global,
+ {{&sbrec_table_sb_global, NULL, NULL},
+ {NULL, NULL, NULL}}},
+
{&sbrec_table_chassis,
{{&sbrec_table_chassis, &sbrec_chassis_col_name, NULL},
{NULL, NULL, NULL}}},
run_prerequisites(struct ctl_command *commands, size_t n_commands,
struct ovsdb_idl *idl)
{
- struct ctl_command *c;
+ ovsdb_idl_add_table(idl, &sbrec_table_sb_global);
- for (c = commands; c < &commands[n_commands]; c++) {
+ for (struct ctl_command *c = commands; c < &commands[n_commands]; c++) {
if (c->syntax->prerequisites) {
struct sbctl_context sbctl_ctx;
ovsdb_idl_txn_add_comment(txn, "ovs-sbctl: %s", args);
+ const struct sbrec_sb_global *sb = sbrec_sb_global_first(idl);
+ if (!sb) {
+ /* XXX add verification that table is empty */
+ sb = sbrec_sb_global_insert(txn);
+ }
+
symtab = ovsdb_symbol_table_create();
for (c = commands; c < &commands[n_commands]; c++) {
ds_init(&c->output);
}
static const struct ctl_command_syntax sbctl_commands[] = {
+ { "init", 0, 0, "", NULL, sbctl_init, NULL, "", RW },
+
/* Chassis commands. */
{"chassis-add", 3, 3, "CHASSIS ENCAP-TYPE ENCAP-IP", pre_get_info,
cmd_chassis_add, NULL, "--may-exist", RW},