1 |
commit: 09e075daf36042e7ea411ec550b86041b21990fe |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 27 00:10:37 2013 +0000 |
4 |
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> |
5 |
CommitDate: Fri Dec 27 00:10:37 2013 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/api.git;a=commit;h=09e075da |
7 |
|
8 |
Add a README with seed file field descriptions |
9 |
|
10 |
--- |
11 |
files/gentoo-keys/seeds/README | 58 ++++++++++++++++++++++++++++++++++++++++++ |
12 |
1 file changed, 58 insertions(+) |
13 |
|
14 |
diff --git a/files/gentoo-keys/seeds/README b/files/gentoo-keys/seeds/README |
15 |
new file mode 100644 |
16 |
index 0000000..9bf5301 |
17 |
--- /dev/null |
18 |
+++ b/files/gentoo-keys/seeds/README |
19 |
@@ -0,0 +1,58 @@ |
20 |
+ |
21 |
+ |
22 |
+This README is to describle the current form of the seed files |
23 |
+and the fields data they contain. |
24 |
+ |
25 |
+CAUTION: These specs are not to be considered stable and |
26 |
+are likely to change in the future. |
27 |
+ |
28 |
+============================================================ |
29 |
+Python file excerpt of the GKEY named tuple class used to |
30 |
+represent the data in the seed file. |
31 |
+============================================================= |
32 |
+ |
33 |
+ |
34 |
+# some constants used in gkeyldap/actions.py |
35 |
+# they map the index values of the GKEY input data fields |
36 |
+NICK = 0 |
37 |
+NAME = 1 |
38 |
+KEYID = 2 |
39 |
+LONGKEYID = 3 |
40 |
+KEYDIR = 4 |
41 |
+FINGERPRINT = 5 |
42 |
+ |
43 |
+# set some defaults |
44 |
+KEY_LEN = { |
45 |
+ 'keyid': 8, |
46 |
+ 'longkeyid': 16, |
47 |
+} |
48 |
+ |
49 |
+ |
50 |
+class GKEY(namedtuple('GKEY', ['nick', 'name', 'keyid', 'longkeyid', |
51 |
+ 'keydir', 'fingerprint'])): |
52 |
+ '''Class to hold the relavent info about a key''' |
53 |
+ |
54 |
+ field_types = {'nick': str, 'name': str, 'keyid': list, |
55 |
+ 'longkeyid': list, 'keydir': str, 'fingerprint': list} |
56 |
+ field_separator = "|" |
57 |
+ list_separator = ":" |
58 |
+ __slots__ = () |
59 |
+ |
60 |
+ |
61 |
+============================================================= |
62 |
+ |
63 |
+Current fileds data in the seed files are: |
64 |
+ |
65 |
+============================================================= |
66 |
+ |
67 |
+field-0|field-1|field-2|filed-3|field-4|field-5 |
68 |
+ |
69 |
+['nick', 'name', 'keyid', 'longkeyid', 'keydir', 'fingerprint'] |
70 |
+ |
71 |
+fields2,3,5 may be lists with a ":" separating list members. |
72 |
+This is going to change to use a "," as the list separator. |
73 |
+ |
74 |
+Also, the keyid and longkeyid fileds are likely to be dropped, as version 3 |
75 |
+gpg key types will not be used/allowed. |
76 |
+Therefore since the keyid and longkeyid are just substrings of the fingerprint. |
77 |
+They do not need to be tracked. |