aboutsummaryrefslogtreecommitdiff
path: root/gkeys
diff options
context:
space:
mode:
Diffstat (limited to 'gkeys')
-rw-r--r--gkeys/gkeys/action_map.py19
-rw-r--r--gkeys/gkeys/actions.py14
2 files changed, 31 insertions, 2 deletions
diff --git a/gkeys/gkeys/action_map.py b/gkeys/gkeys/action_map.py
index f372a5c..1bd0625 100644
--- a/gkeys/gkeys/action_map.py
+++ b/gkeys/gkeys/action_map.py
@@ -15,7 +15,8 @@ from collections import OrderedDict
Seed_Actions = ['----seeds----', 'add-seed', 'fetch-seed',
- 'list-seed', 'list-seedfiles', 'move-seed', 'remove-seed']
+ 'update-seed', 'list-seed', 'list-seedfiles', 'move-seed',
+ 'remove-seed']
Key_Actions = ['----keys-----', 'check-key', 'installed',
'install-key', 'list-key', 'send-key', 'refresh-key', 'remove-key',
@@ -380,6 +381,22 @@ Found Failures:
Fetch operation completed
''',
}),
+ ('update-seed', {
+ 'func': 'updateseed',
+ 'options': ['category', 'nick', '1file', 'dest', 'signature',
+ 'timestamp'],
+ 'desc': '''Update the selected seed file(s)''',
+ 'long_desc': '''Update the selected seed file(s)''',
+ 'example': '''$ gkeys update-seed -C gentoo-devs
+
+ Gkey task results:
+ Verification succeeded.: /home/brian/gpg-test/seeds/gentoo-devs.seeds
+ Key info...............: Gentoo-Linux Gentoo-keys Project Signing Key <gkeys>, 0xA41DBBD9151C3FC7
+ category, nick.....: gentoo gkeys
+
+ Update operation completed
+''',
+ }),
('list-seed', {
'func': 'listseed',
'options': ['category', 'nick', 'name', 'fingerprint', 'keys',
diff --git a/gkeys/gkeys/actions.py b/gkeys/gkeys/actions.py
index 5446dc3..3bc5f02 100644
--- a/gkeys/gkeys/actions.py
+++ b/gkeys/gkeys/actions.py
@@ -96,7 +96,19 @@ class Actions(ActionBase):
messages.append("")
messages.append("Fetch operation completed")
return (False not in success, messages)
-
+
+ def updateseed(self, args):
+ '''Updates seeds of a selected file'''
+ self.logger.debug(_unicode("ACTIONS: updateseed; args: %s")
+ % _unicode(args))
+ fetch_success, fetch_messages = self.fetchseed(args)
+ if fetch_success is not True:
+ return (False, fetch_messages)
+ install_success, install_messages = self.installkey(args)
+ if install_success is not True:
+ return (False, install_messages)
+ messages = fetch_messages + [install_messages]
+ return (True, messages)
def addseed(self, args):
'''Add or replace a key in the selected seed file'''