@@ -66,6 +66,12 @@ get_bridge_mappings(const struct smap *ext_ids)
return smap_get_def(ext_ids, "ovn-bridge-mappings", "");
}
+static const char *
+get_cms_options(const struct smap *ext_ids)
+{
+ return smap_get_def(ext_ids, "ovn-cms-options", "");
+}
+
/* Returns this chassis's Chassis record, if it is available and is currently
* amenable to a transaction. */
const struct sbrec_chassis *
@@ -119,6 +125,7 @@ chassis_run(struct controller_ctx *ctx, const char *chassis_id,
const char *bridge_mappings = get_bridge_mappings(&cfg->external_ids);
const char *datapath_type =
br_int && br_int->datapath_type ? br_int->datapath_type : "";
+ const char *cms_options = get_cms_options(&cfg->external_ids);
struct ds iface_types = DS_EMPTY_INITIALIZER;
ds_put_cstr(&iface_types, "");
@@ -144,16 +151,20 @@ chassis_run(struct controller_ctx *ctx, const char *chassis_id,
= smap_get_def(&chassis_rec->external_ids, "datapath-type", "");
const char *chassis_iface_types
= smap_get_def(&chassis_rec->external_ids, "iface-types", "");
+ const char *chassis_cms_options
+ = get_cms_options(&chassis_rec->external_ids);
/* If any of the external-ids should change, update them. */
if (strcmp(bridge_mappings, chassis_bridge_mappings) ||
strcmp(datapath_type, chassis_datapath_type) ||
- strcmp(iface_types_str, chassis_iface_types)) {
+ strcmp(iface_types_str, chassis_iface_types) ||
+ strcmp(cms_options, chassis_cms_options)) {
struct smap new_ids;
smap_clone(&new_ids, &chassis_rec->external_ids);
smap_replace(&new_ids, "ovn-bridge-mappings", bridge_mappings);
smap_replace(&new_ids, "datapath-type", datapath_type);
smap_replace(&new_ids, "iface-types", iface_types_str);
+ smap_replace(&new_ids, "ovn-cms-options", cms_options);
sbrec_chassis_verify_external_ids(chassis_rec);
sbrec_chassis_set_external_ids(chassis_rec, &new_ids);
smap_destroy(&new_ids);
@@ -150,6 +150,13 @@
network interface card, enabling encapsulation checksum may incur
performance loss. In such cases, encapsulation checksums can be disabled.
</dd>
+
+ <dt><code>external_ids:ovn-cms-options</code></dt>
+ <dd>
+ A list of options that will be consumed by the CMS Plugin and which
+ specific to this particular chassis. An example would be:
+ <code>cms_option1,cms_option2:foo</code>.
+ </dd>
</dl>
<p>
@@ -241,6 +241,14 @@
read-only. See <code>ovn-controller</code>(8) for more information.
</column>
+ <column name="external_ids" key="ovn-cms-options">
+ <code>ovn-controller</code> populates this key with the set of options
+ configured in the <ref table="Open_vSwitch"
+ column="external_ids:ovn-cms-options"/> column of the Open_vSwitch
+ database's <ref table="Open_vSwitch" db="Open_vSwitch"/> table.
+ See <code>ovn-controller</code>(8) for more information.
+ </column>
+
<group title="Common Columns">
The overall purpose of these columns is described under <code>Common
Columns</code> at the beginning of this document.