예제 #1
0
    def parse(self):

        self.parser.usage = '''%prog [options] metadata-file'''

        self.parser.description = '''
Sign the given metadata description of a machine or disk image.  The
metadata-file argument is the file containing the metadata to sign.
'''

        P12Certificate.addOptions(self.parser)

        self.parser.add_option('--output', dest='outputManifestFile',
                               help='signed metadata file (same as input; input moved to *.orig)',
                               default=None)

        self.parser.add_option('--email', dest='email',
                               help='email address if not in certificate',
                               default='')

        self.options, self.args = self.parser.parse_args()
예제 #2
0
    def buildDeprecatorParser(parser):
        parser.usage = '''usage: %prog [options] image-id'''

        parser.description = '''
Create a new metadata entry for the given image that deprecates the
image.  The reason for the deprecation must be given. The image-id
argument is the identifier of the image to deprecate.
'''

        MarketplaceUtil.addEndpointOption(parser)
        P12Certificate.addOptions(parser)

        parser.add_option('--email', dest='email',
                help='email address of endorser of metadata entry',
                default='')

        parser.add_option('--created', dest='created',
                help='date of metadata entry to be deprecated, latest entry will be deprecated if not provided',
                default='')

        parser.add_option('--reason', dest='reason',
                help='Comment to append to deprecation',
                default='This image has been deprecated', metavar='TEXT')