Пример #1
0
    def __init__(self):
        Command.__init__(self, "setup-genschema",
                         summary="Generate directory schema")

        choices = ["ad", "edir", "openldap"]
        self.add_option("-t", "--target", choices=choices)
        self.add_option("-o", "--output-file", type="string")
Пример #2
0
    def __init__(self):
        Command.__init__(self, "mail-export", aliases=["me"],
                         summary="Export mail from the store",
                         usage="%prog %cmd <file1> [<file2> ...]")

        self.add_option("-t", "--type", type="string", default="mbox", help=_("Type of mail destination [mbox or maildir], defaults to mbox"))
        self.add_option("-f", "--folder", type="string", default="INBOX", help=_("Folder to export from, defaults to INBOX"))
Пример #3
0
    def __init__(self):
        Command.__init__(self, "mail-import", aliases=["mi"],
                         summary="Import mail into the store",
                         usage="%prog %cmd <file1> [<file2> ...]")

        self.add_option("-t", "--type", type="string", default="mbox", help=_("Type of mail source [mbox or maildir], defaults to mbox"))
        self.add_option("-f", "--folder", type="string", default="INBOX", help=_("Folder to import to, defaults to INBOX"))
Пример #4
0
    def __init__(self):
        Command.__init__(self, "agent-modify", aliases=["am"],
                         summary=_("Modify a Bongo agent"))

        self.set_usage(_("%prog %cmd <agent> [options]"))
        self.add_option("", "--server", type="string", default="Bongo Messaging Server", help="[default %default]")

        # placeholder for attributes, so we can assume there's a hash
        # in options.attributes
        self.add_option("", "--attributes", action="store_const", default={},
                        help=optparse.SUPPRESS_HELP)

        agentArgs = CmdUtil.GetAgentArgs()
        seenArgs = {}

        for agent, args in agentArgs.items():
            group = optparse.OptionGroup(self, self.get_pretty_agent(agent))

            for arg, desc in args:
                if seenArgs.has_key(arg):
                    # you can only add_option a long opt once
                    continue

                group.add_option(
                    "", "--" + arg, type="string", metavar="VALUE",
                    help=desc, action="callback",
                    callback=CmdUtil.RecordAttributes)
                seenArgs[arg] = 1

            self.add_option_group(group)
Пример #5
0
    def __init__(self):
        Command.__init__(self, "setup-ssl",
                         summary="Generate or install an SSL key/cert pair")

        self.add_option("-c", "--cert")
        self.add_option("-k", "--key")
        self.add_option("-i", "--ip")
        self.add_option("-d", "--domain")
Пример #6
0
 def __init__(self):
     Command.__init__(
         self,
         "document-put",
         aliases=["put"],
         summary="Put a file into a user store",
         usage="%prog %cmd <document> <filename> [<type>]",
     )
Пример #7
0
 def __init__(self):
     Command.__init__(
         self,
         "document-get",
         aliases=["get"],
         summary="Get a file from a user store",
         usage="%prog %cmd <document> [<filename>]",
     )
Пример #8
0
 def __init__(self):
     Command.__init__(
         self,
         "document-list",
         aliases=["list"],
         summary="List objects in a collection",
         usage="%prog %cmd [<collection>]",
     )
Пример #9
0
 def __init__(self):
     Command.__init__(
         self,
         "store-restore",
         aliases=["sr"],
         summary="Restore a backup of a user store",
         usage="%prog %cmd <store> [<backup>]",
     )
Пример #10
0
    def __init__(self):
        Command.__init__(self,"mail-importimap", aliases=["mii"],
                        summary="Imports mail from an IMAP server",
                        usage="%prog %cmd")

        self.add_option("", "--imap_username", type="string", default="", help=_("IMAP server username"))
        self.add_option("", "--imap_password", type="string", default="", help=_("IMAP server password"))
        self.add_option("", "--imap_folder", type="string", default="INBOX", help=_("IMAP server folder to export from, defaults to INBOX"))
        self.add_option("", "--imap_server", type="string", default="", help=_("IMAP server hostname"))
        self.add_option("", "--imap_port", type="int", default=143, help=_("IMAP server port, defaults to 143"))
        self.add_option("-f", "--folder", type="string", default="INBOX", help=_("Folder to import into, defaults to INBOX"))
Пример #11
0
    def __init__(self):
        Command.__init__(self, "user-modify", aliases=["um"],
                         summary=_("Modify a Bongo user"))

        self.set_usage(_("%prog %cmd <username> [options]"))

        # placeholder for attributes, so we can assume there's a hash
        # in options.attributes
        self.add_option("", "--attributes", action="store_const", default={},
                        help=optparse.SUPPRESS_HELP)

        args = CmdUtil.GetAttributeArgs(MDB.C_USER, msgapi.C_USER_SETTINGS)

        for arg, desc in args:
            self.add_option("", "--" + arg, type="string", metavar="VALUE",
                            help=desc, action="callback",
                            callback=CmdUtil.RecordAttributes)
Пример #12
0
 def __init__(self):
     Command.__init__(self, "testrun", aliases=["tr"],
                      summary="Run a test suite against the store",
                      usage="%prog %cmd")
Пример #13
0
 def __init__(self):
     Command.__init__(self, "addressbook-import", aliases=["ai"],
                      summary="Import VCF data from files",
                      usage="%prog %cmd <file1> [<file2> ...]")
Пример #14
0
 def __init__(self):
     Command.__init__(self, "addressbook-contacts", aliases=["ac"],
                      summary="List the contacts in an addressbook",
                      usage="%prog %cmd <addressbook>")
Пример #15
0
 def __init__(self):
     Command.__init__(self, "addressbook-list", aliases=["al"],
                      summary="List the addressbooks in your store")
Пример #16
0
 def __init__(self):
     Command.__init__(self, "setup-rights",
                      summary="Grant access to Bongo services on the Bongo tree")
     self.add_option("", "--base", type="string")
Пример #17
0
 def __init__(self):
     Command.__init__(self, "calendar-unshare", aliases=["cush"],
                      summary="Revoke access from a given calendar",
                      usage="%prog %cmd <name> [address, ...]")
Пример #18
0
 def __init__(self):
     Command.__init__(self, "agent-list", aliases=["al"],
                      summary=_("List configured Bongo agents"))
     self.set_usage(_("%prog %cmd"))
Пример #19
0
    def __init__(self):
        Command.__init__(self, "import",
                         summary="Import a bongo-setup.xml tree")

        self.add_option("-f", "--file", type="string")
Пример #20
0
 def __init__(self):
     Command.__init__(self, "calendar-list", aliases=["cl"],
                      summary="List the calendars in your store")
Пример #21
0
 def __init__(self):
     Command.__init__(self, "setup-system-credential",
                      summary="Generate Bongo system agent credential")
Пример #22
0
 def __init__(self):
     Command.__init__(self, "calendar-share", aliases=["csh"],
                      summary="Share a calendar with a set of addresses",
                      usage="%prog %cmd <name> [address, ...]")
Пример #23
0
 def __init__(self):
     Command.__init__(self, "server-info", aliases=["si"],
                      summary=_("List information about configured Bongo servers"))
     self.set_usage(_("%prog %cmd [server1 [server2 ...]]"))
Пример #24
0
 def __init__(self):
     Command.__init__(self, "calendar-events", aliases=["ce"],
                      summary="List the events in a calendar",
                      usage="%prog %cmd <calendar>")
Пример #25
0
 def __init__(self):
     Command.__init__(self, "calendar-list-shares", aliases=["cls"],
                      summary="List sharing info for a given calendar",
                      usage="%prog %cmd <name>")
Пример #26
0
 def __init__(self):
     Command.__init__(self, "agent-delete", aliases=["ad"],
                      summary="Delete a Bongo agent")
     self.set_usage(_("%prog %cmd <agent>"))
     self.add_option("", "--server", action="store_const", default="Bongo Messaging Server")
Пример #27
0
 def __init__(self):
     Command.__init__(self, "agent-info", aliases=["ai"],
                      summary=_("List info for an agent"))
     self.set_usage(_("%prog %cmd <agent>"))
     self.add_option("", "--server", type="string", default="Bongo Messaging Server", help="[default %default]")
Пример #28
0
 def __init__(self):
     Command.__init__(self, "setup-mdb",
                      summary="Configure an mdb tree")
Пример #29
0
 def __init__(self):
     Command.__init__(self, "server-list", aliases=["sl"],
                      summary=_("List configured Bongo servers"))
     self.set_usage(_("%prog %cmd"))
Пример #30
0
 def __init__(self):
     Command.__init__(self, "calendar-accept-share", aliases=["cash"],
                      summary="Accept a specified calendar invitation",
                      usage="%prog %cmd <calname>")