"machine": ["Machine Hardware", 10],
"memory": ["Memory", 11],
"disk": ["Disk", 12],
- "bandwidth": ["Bandwidth", 13]};
+ "sshrsahostkey": ["SSH Host Keys", 14],
+ "bandwidth": ["Bandwidth", 15]};
AttrPrompt = {"description": ["Purpose of the machine"],
"hostname": ["The hostnames for the box (ipv4/ipv6)"],
"machine": ["Hardware description"],
"memory": ["Installed RAM"],
"disk": ["Disk Space, RAID levels, etc"],
+ "sshrsahostkey": ["A copy of /etc/ssh/ssh_*host_key.pub"],
"bandwidth": ["Available outbound"]};
# Create a map of IDs to desc,value,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,""));
if RootMode == 1:
print " a) Arbitary Change";
print " n) New Host";
+ print " d) Delete Host";
print " u) Switch Hosts";
print " x) Exit";
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);