projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Import from samosa: support for debianGroup and ldap-AND
[mirror/userdir-ldap.git]
/
ud-host
diff --git
a/ud-host
b/ud-host
index
d0fe689
..
0c8d12f
100755
(executable)
--- a/
ud-host
+++ b/
ud-host
@@
-26,9
+26,8
@@
AttrInfo = {"description": ["Machine Descr.", 1],
"machine": ["Machine Hardware", 10],
"memory": ["Memory", 11],
"disk": ["Disk", 12],
"machine": ["Machine Hardware", 10],
"memory": ["Memory", 11],
"disk": ["Disk", 12],
- "sshrsahostkey": ["SSH RSA", 14],
- "sshdsahostkey": ["SSH DSA", 15],
- "bandwidth": ["Bandwidth", 16]};
+ "sshrsahostkey": ["SSH Host Keys", 14],
+ "bandwidth": ["Bandwidth", 15]};
AttrPrompt = {"description": ["Purpose of the machine"],
"hostname": ["The hostnames for the box (ipv4/ipv6)"],
AttrPrompt = {"description": ["Purpose of the machine"],
"hostname": ["The hostnames for the box (ipv4/ipv6)"],
@@
-42,8
+41,7
@@
AttrPrompt = {"description": ["Purpose of the machine"],
"machine": ["Hardware description"],
"memory": ["Installed RAM"],
"disk": ["Disk Space, RAID levels, etc"],
"machine": ["Hardware description"],
"memory": ["Installed RAM"],
"disk": ["Disk Space, RAID levels, etc"],
- "sshrsahostkey": ["A copy of /etc/ssh/ssh_host_key.pub"],
- "sshdsahostkey": ["A copy of /etc/ssh/ssh_host_key.pub.dsa"],
+ "sshrsahostkey": ["A copy of /etc/ssh/ssh_*host_key.pub"],
"bandwidth": ["Available outbound"]};
# Create a map of IDs to desc,value,attr
"bandwidth": ["Available outbound"]};
# Create a map of IDs to desc,value,attr
@@
-94,7
+92,7
@@
def ShowAttrs(Attrs):
# Change a single attribute
def ChangeAttr(Attrs,Attr):
# Change a single attribute
def ChangeAttr(Attrs,Attr):
- if (Attr == "sponsor" or Attr == "hostname"):
+ if (Attr == "sponsor" or Attr == "hostname"
or Attr == "sshrsahostkey"
):
return MultiChangeAttr(Attrs,Attr);
print "Old value: '%s'" % (GetAttr(Attrs,Attr,""));
return MultiChangeAttr(Attrs,Attr);
print "Old value: '%s'" % (GetAttr(Attrs,Attr,""));
@@
-211,6
+209,7
@@
while(1):
if RootMode == 1:
print " a) Arbitary Change";
print " n) New Host";
if RootMode == 1:
print " a) Arbitary Change";
print " n) New Host";
+ print " d) Delete Host";
print " u) Switch Hosts";
print " x) Exit";
print " u) Switch Hosts";
print " x) Exit";
@@
-265,6
+264,14
@@
while(1):
ChangeAttr(Attrs[0],Attr);
continue;
ChangeAttr(Attrs[0],Attr);
continue;
+ if (Response == 'd'):
+ Really = raw_input("Really (type yes)? ");
+ if Really != 'yes':
+ continue;
+ print "Deleting",HostDn;
+ l.delete_s(HostDn);
+ continue;
+
# Convert the integer response
try:
ID = int(Response);
# Convert the integer response
try:
ID = int(Response);