bitkeeper revision 1.1108.35.5 (41090ef2VknMjEjPGflC7vkB7aE0IQ)

Add commands to convert between domain names and ids.
This commit is contained in:
mjw@wray-m-3.hpl.hp.com committed 2004-07-29 14:51:30 +00:00
1 parent 0d48b7db69
commit 10040e30aa
1 file changed
+34
+34
View File
@@ -452,6 +452,40 @@ class ProgMaxmem(Prog):
xm.prog(ProgMaxmem)
class ProgDomid(Prog):
group = 'domain'
name = 'domid'
info = 'Convert a domain name to a domain id.'
def help(self, args):
print args[0], "DOM"
print '\nGet the domain id for the domain with name DOM.'
def main (self, args):
if len(args) != 2: self.err("%s: Invalid argument(s)" % args[0])
name = args[1]
dom = server.xend_domain(name)
print sxp.child_value(dom, 'id')
xm.prog(ProgDomid)
class ProgDomname(Prog):
group = 'domain'
name = 'domname'
info = 'Convert a domain id to a domain name.'
def help(self, args):
print args[0], "DOM"
print '\nGet the name for the domain with id DOM.'
def main (self, args):
if len(args) != 2: self.err("%s: Invalid argument(s)" % args[0])
name = args[1]
dom = server.xend_domain(name)
print sxp.child_value(dom, 'name')
xm.prog(ProgDomname)
class ProgBvt(Prog):
group = 'scheduler'
name = "bvt"
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.