diff options
author | Jason Kincl <kincljc@ornl.gov> | 2013-05-22 11:59:16 -0400 |
---|---|---|
committer | Jason Kincl <kincljc@ornl.gov> | 2013-05-22 11:59:16 -0400 |
commit | bc925f4059496894c951b0ddb86cb5ae774edd1e (patch) | |
tree | c9760db81d2a62aee2f8a337ed93b312df83aabc /tools | |
parent | dafa48723db14f32a6ae07aa9a21df53bd945650 (diff) | |
download | bcfg2-bc925f4059496894c951b0ddb86cb5ae774edd1e.tar.gz bcfg2-bc925f4059496894c951b0ddb86cb5ae774edd1e.tar.bz2 bcfg2-bc925f4059496894c951b0ddb86cb5ae774edd1e.zip |
adding doc
Diffstat (limited to 'tools')
-rw-r--r-- | tools/upgrade/1.3/README | 5 | ||||
-rwxr-xr-x | tools/upgrade/1.3/migrate_probe_groups_to_db.py | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tools/upgrade/1.3/README b/tools/upgrade/1.3/README index 2831d8f00..1a919f869 100644 --- a/tools/upgrade/1.3/README +++ b/tools/upgrade/1.3/README @@ -19,3 +19,8 @@ migrate_dbstats.py migrate_perms_to_mode.py - Convert perms attribute to mode (note that if you have info/:info files, you should run migrate_info.py first) + +migrate_probe_groups_to_db.py + - Migrate Probe host and group data from XML to DB backend for Metadata + and Probe plugins. Does not migrate individual probe return data. Assumes + migration to BOTH Metadata and Probe to database backends. diff --git a/tools/upgrade/1.3/migrate_probe_groups_to_db.py b/tools/upgrade/1.3/migrate_probe_groups_to_db.py index 540d10505..73339e787 100755 --- a/tools/upgrade/1.3/migrate_probe_groups_to_db.py +++ b/tools/upgrade/1.3/migrate_probe_groups_to_db.py @@ -1,4 +1,7 @@ #!/bin/env python +""" Migrate Probe host and group data from XML to DB backend for Metadata +and Probe plugins. Does not migrate individual probe return data. Assumes +migration to BOTH Metadata and Probe to database backends. """ import os os.environ['DJANGO_SETTINGS_MODULE'] = 'Bcfg2.settings' @@ -11,6 +14,7 @@ from Bcfg2.Server.Plugins.Metadata import MetadataClientModel from Bcfg2.Server.Plugins.Probes import ProbesGroupsModel def migrate(xclient): + """ Helper to do the migration given a <Client/> XML element """ client_name = xclient.get('name') try: try: @@ -43,6 +47,7 @@ def migrate(xclient): return True def main(): + """ Main """ opts = dict(repo=Bcfg2.Options.SERVER_REPOSITORY) setup = Bcfg2.Options.OptionParser(opts) setup.parse(sys.argv[1:]) |