summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJason Kincl <kincljc@ornl.gov>2013-05-22 11:59:16 -0400
committerJason Kincl <kincljc@ornl.gov>2013-05-22 11:59:16 -0400
commitbc925f4059496894c951b0ddb86cb5ae774edd1e (patch)
treec9760db81d2a62aee2f8a337ed93b312df83aabc /tools
parentdafa48723db14f32a6ae07aa9a21df53bd945650 (diff)
downloadbcfg2-bc925f4059496894c951b0ddb86cb5ae774edd1e.tar.gz
bcfg2-bc925f4059496894c951b0ddb86cb5ae774edd1e.tar.bz2
bcfg2-bc925f4059496894c951b0ddb86cb5ae774edd1e.zip
adding doc
Diffstat (limited to 'tools')
-rw-r--r--tools/upgrade/1.3/README5
-rwxr-xr-xtools/upgrade/1.3/migrate_probe_groups_to_db.py5
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:])