[ovs-git] Open vSwitch: ovs-vsctl: Add commands for low-level database manipulation. (next)

dev at openvswitch.org dev at openvswitch.org
Tue Jan 26 17:51:10 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, next has been updated
       via  ad83bfa65881712c3d9bc22e7430ddbc6c7bcaba (commit)
       via  0194f33a6c734f0ff946fad9fb6b059b29ebf13e (commit)
       via  2f47998baea215b996af0be4d1653032005e3ac4 (commit)
       via  979821c0a6b0c8a9f941a2e13c49feffe2391ab8 (commit)
       via  36d802ae1fd61d5ae3bfa1b114b8f3a911d987e5 (commit)
       via  7d23a63aa4bc4479bf85b739e5be80ab12c5fc1b (commit)
       via  181aba2eb0dc0b2235eee33f8d87edd804362533 (commit)
       via  c7f7adb70cb34bb568f9b6327d6adb945326e029 (commit)
       via  00732bf5b5da6f1d71dc4f4b42f54224c03f71f6 (commit)
       via  bda8868801ebe49b785f4810e055fb6bf80a1dc6 (commit)
       via  58fbee4664788d779ad7b0e57c3dd420adca9221 (commit)
       via  8fdf84570240c50436c839031e4da9f75839e9a3 (commit)
       via  f99cd6eed222152d9e6cfb3cc83cba5d02f3e160 (commit)
      from  05b3c97be6a9a5efa27edb40023e329f680837c5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ad83bfa65881712c3d9bc22e7430ddbc6c7bcaba
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=ad83bfa65881712c3d9bc22e7430ddbc6c7bcaba
Author: Ben Pfaff <blp at nicira.com>
		
ovs-vsctl: Add commands for low-level database manipulation.
		
The new "get", "list", "set", and "add" commands provide lower-level
access to the vswitch database than the other ovs-vsctl commands, but they
are more convenient than using ovsdb-client directly.

This commit deserves several enhancements, but users are clamoring for
some kind of interface, so this is a starting point.


commit 0194f33a6c734f0ff946fad9fb6b059b29ebf13e
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=0194f33a6c734f0ff946fad9fb6b059b29ebf13e
Author: Ben Pfaff <blp at nicira.com>
		
ovsdb-datum: Add functions for parsing and formatting atoms, data.
		
These functions provide an alternative to JSON parsing and formatting that
is more human-friendly (and shorter).

These will be used in an upcoming commit to enhance ovs-vsctl.


commit 2f47998baea215b996af0be4d1653032005e3ac4
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=2f47998baea215b996af0be4d1653032005e3ac4
Author: Ben Pfaff <blp at nicira.com>
		
ovsdb-data: Add some more functions for dealing with "struct ovsdb_datum".
		
This commit refactors the functions for working with "struct ovsdb_datum",
adding and exposing some more operations for ovs-vsctl to use in an
upcoming commit.


commit 979821c0a6b0c8a9f941a2e13c49feffe2391ab8
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=979821c0a6b0c8a9f941a2e13c49feffe2391ab8
Author: Ben Pfaff <blp at nicira.com>
		
ovsdb-idl: Allow clients to modify records without using structs.
		
The IDL is intended to allow clients easier access to data in the database
by providing an extra layer of abstraction.  However, ovs-vsctl needs to
also provide generic access to database tables, rows, and columns, and
until now the IDL has not allowed this.  In particular, there was no way
to modify the value of a database column by providing a "struct
ovsdb_datum" with the new value and then have that reflected in the IDL
structs, although the other direction was possible.

This commit fixes that problem, which requires a bit of refactoring of the
IDL layer.  It also exposes the interface for iterating through table
records to clients directly, by moving it from the "private" IDL header to
the public one.


commit 36d802ae1fd61d5ae3bfa1b114b8f3a911d987e5
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=36d802ae1fd61d5ae3bfa1b114b8f3a911d987e5
Author: Ben Pfaff <blp at nicira.com>
		
json: New function json_to_ds().
		
Some upcoming code wants to serialize JSON into a "struct ds" dynamic
string buffer, so expose an interface to do this.

This commit doesn't change much, but it renames some functions internal
to json.c to make the naming more consistent.

Also, make jsonrpc_log_msg() use this new function, since it is a more
straightforward way to do what it wants.


commit 7d23a63aa4bc4479bf85b739e5be80ab12c5fc1b
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7d23a63aa4bc4479bf85b739e5be80ab12c5fc1b
Author: Ben Pfaff <blp at nicira.com>
		
json: Export function to parse an individual JSON string.
		
The JSON syntax for strings is very reasonable.  An upcoming commit will
have a need for a string parser, so make the JSON string parser available
for that.

Also, this change improves the error message for strings that end in the
middle of a \u sequence, so update the tests to match.


commit 181aba2eb0dc0b2235eee33f8d87edd804362533
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=181aba2eb0dc0b2235eee33f8d87edd804362533
Author: Ben Pfaff <blp at nicira.com>
		
ovsdb-idl: Avoid redundant memset.
		


commit c7f7adb70cb34bb568f9b6327d6adb945326e029
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=c7f7adb70cb34bb568f9b6327d6adb945326e029
Author: Ben Pfaff <blp at nicira.com>
		
ovsdb-idl: Fix use-after-free error in ovsdb_idl_txn_delete().
		


commit 00732bf5b5da6f1d71dc4f4b42f54224c03f71f6
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=00732bf5b5da6f1d71dc4f4b42f54224c03f71f6
Author: Ben Pfaff <blp at nicira.com>
		
Cleanly separate IDL annotations from OVSDB schema information.
		
Until now, the OVSDB IDL annotations have been glommed together with the
schema information in a single file, and then we've used ovsdb-idlc to
extract the schema from that file.  This commit reverses the process:
the schema and the annotations are stored separately and then glommed
together as necessary at build time.

This new arrangement has a few advantages:

    - We can now easily have multiple different sets of IDL annotations
      for a single OVSDB schema.  For example, some users may not need
      access to columns that other users do.

    - Bugs in ovsdb-idlc cannot screw up the underlying schema (as shown
      by a recent commit).


commit bda8868801ebe49b785f4810e055fb6bf80a1dc6
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=bda8868801ebe49b785f4810e055fb6bf80a1dc6
Author: Ben Pfaff <blp at nicira.com>
		
vswitch: Remove redundant "internal" column from Interface table.
		
This column's function is now served by the "type" column, which is set
to "internal" to mark an interface as internal.


commit 58fbee4664788d779ad7b0e57c3dd420adca9221
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=58fbee4664788d779ad7b0e57c3dd420adca9221
Author: Ben Pfaff <blp at nicira.com>
		
vswitch: Fix types of NetFlow columns in db schema.
		
This bug was masked by the translation done by ovsdb-idlc, which doesn't
fully validate its input.  In particular, it ignores fields that it doesn't
know about and drops them when it does translation, so nothing later can
find the problem.

An upcoming commit will ensure that it can't happen again, by dropping the
ovsdb-idlc translation step.


commit 8fdf84570240c50436c839031e4da9f75839e9a3
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=8fdf84570240c50436c839031e4da9f75839e9a3
Author: Ben Pfaff <blp at nicira.com>
		
ovsdb-idlc: With "doc" command, output tables and columns alphabetically.
		
Until this commit, tables and columns in output were output in random
order (according to the ordering of Python's internal hash table).
Alphabetical order makes more sense.

Thanks to Reid Price for useful Python tips.


commit f99cd6eed222152d9e6cfb3cc83cba5d02f3e160
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=f99cd6eed222152d9e6cfb3cc83cba5d02f3e160
Author: Ben Pfaff <blp at nicira.com>
		
tests: Prefer $(VAR) over @VAR@ in Makefiles.
		
The Autoconf documentation recently started recommending $(VAR) over @VAR@,
so adopt this style.


-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                                        |    1 +
 debian/openvswitch-common.install                  |    2 +-
 debian/rules                                       |    4 -
 lib/json.c                                         |  208 ++++--
 lib/json.h                                         |    9 +-
 lib/jsonrpc.c                                      |    8 +-
 lib/ovsdb-data.c                                   |  519 +++++++++++++--
 lib/ovsdb-data.h                                   |   72 ++-
 lib/ovsdb-idl-provider.h                           |   14 +-
 lib/ovsdb-idl.c                                    |  160 ++++-
 lib/ovsdb-idl.h                                    |   20 +-
 ovsdb/automake.mk                                  |   23 +-
 ovsdb/mutation.c                                   |    4 +-
 ovsdb/ovsdb-idlc.1                                 |   51 +-
 ovsdb/ovsdb-idlc.in                                |  288 ++++----
 tests/.gitignore                                   |    2 +-
 tests/automake.mk                                  |   31 +-
 tests/idltest.ann                                  |   13 +
 tests/{idltest.ovsidl => idltest.ovsschema}        |   19 +-
 tests/json.at                                      |    5 +-
 tests/ovsdb-idl.at                                 |   13 +-
 tests/ovsdb-macros.at                              |    2 +-
 utilities/ovs-vsctl.8.in                           |  111 +++
 utilities/ovs-vsctl.c                              |  748 +++++++++++++++++++-
 vswitchd/.gitignore                                |    2 +-
 vswitchd/automake.mk                               |   23 +-
 vswitchd/vswitch-idl.ann                           |   20 +
 vswitchd/{vswitch-idl.ovsidl => vswitch.ovsschema} |   39 +-
 28 files changed, 1967 insertions(+), 444 deletions(-)
 create mode 100644 tests/idltest.ann
 rename tests/{idltest.ovsidl => idltest.ovsschema} (54%)
 create mode 100644 vswitchd/vswitch-idl.ann
 rename vswitchd/{vswitch-idl.ovsidl => vswitch.ovsschema} (90%)


hooks/post-receive
-- 
Open vSwitch




More information about the git mailing list