def Args(parser): base.Argument( '--location', help='Location of the certificate authorities. If ommitted, root CAs across all regions will be listed.' ).AddToParser(parser) base.Argument( '--pool', help='ID of the CA Pool where the certificate authorities reside. If ommitted, root CAs across all CA pools will be listed.' ).AddToParser(parser) base.PAGE_SIZE_FLAG.SetDefault(parser, 100) base.FILTER_FLAG.RemoveFromParser(parser) parser.display_info.AddFormat(""" table( name.basename(), name.scope().segment(-5):label=LOCATION, name.scope().segment(-3):label=POOL, state, state.regex("ENABLED","YES","NO"):label=INCLUDED_IN_POOL_ISSUANCE, ca_certificate_descriptions[0].subject_description.not_before_time():label=NOT_BEFORE, ca_certificate_descriptions[0].subject_description.not_after_time():label=NOT_AFTER) """) parser.display_info.AddTransforms({ 'not_before_time': text_utils.TransformNotBeforeTime, 'not_after_time': text_utils.TransformNotAfterTime }) parser.display_info.AddUriFunc( resource_utils.MakeGetUriFunc( 'privateca.projects.locations.caPools.certificateAuthorities'))
def Args(parser): base.Argument( '--location', help='Location of the certificate authorities.').AddToParser( parser) base.PAGE_SIZE_FLAG.SetDefault(parser, 100) base.FILTER_FLAG.RemoveFromParser(parser) parser.display_info.AddFormat(""" table( name.basename(), name.scope().segment(-3):label=LOCATION, state, ca_certificate_descriptions[0].subject_description.not_before_time():label=NOT_BEFORE, ca_certificate_descriptions[0].subject_description.not_after_time():label=NOT_AFTER) """) parser.display_info.AddTransforms({ 'not_before_time': text_utils.TransformNotBeforeTime, 'not_after_time': text_utils.TransformNotAfterTime }) parser.display_info.AddUriFunc( resource_utils.MakeGetUriFunc( 'privateca.projects.locations.certificateAuthorities'))
def Args(parser): base.Argument( '--location', help='Location of the CA pools. If this is not specified, CA pools ' 'across all locations will be listed.').AddToParser(parser) base.PAGE_SIZE_FLAG.SetDefault(parser, 100) parser.display_info.AddFormat(""" table( name.basename(), name.scope().segment(-3):label=LOCATION, tier) """) parser.display_info.AddUriFunc( resource_utils.MakeGetUriFunc( 'privateca.projects.locations.caPools'))
def Args(parser): base.Argument( '--location', help= ('Location of the reusable configs. If this is not specified, it ' 'defaults to the first location supported by the service.' )).AddToParser(parser) base.PAGE_SIZE_FLAG.SetDefault(parser, 100) base.SORT_BY_FLAG.SetDefault(parser, 'name') parser.display_info.AddFormat(""" table( name.scope("reusableConfigs"):label=NAME, name.scope("locations").segment(0):label=LOCATION, description) """) parser.display_info.AddUriFunc( resource_utils.MakeGetUriFunc( 'privateca.projects.locations.reusableConfigs'))
def Args(parser): base.Argument( '--location', help=( 'The location you want to list the certificate templates for. ' 'Set this to "-" to list certificate templates across all ' 'locations.'), default='-').AddToParser(parser) base.PAGE_SIZE_FLAG.SetDefault(parser, 100) base.SORT_BY_FLAG.SetDefault(parser, 'name') parser.display_info.AddFormat(""" table( name.scope("certificateTemplates"):label=NAME, name.scope("locations").segment(0):label=LOCATION, description )""") parser.display_info.AddUriFunc( resource_utils.MakeGetUriFunc( 'privateca.projects.locations.certificateTemplates'))
def Args(parser): concept_parsers.ConceptParser([ presentation_specs.ResourcePresentationSpec( '--issuer', resource_args.CreateCertificateAuthorityResourceSpec( 'CERTIFICATE_AUTHORITY', ca_id_fallthroughs=[ deps.Fallthrough( function=lambda: '-', hint= ('defaults to all Certificate Authorities in the ' 'given location'), active=False, plural=False) ]), 'The issuing Certificate Authority. If this is omitted, ' 'Certificates issued by all Certificate Authorities in the given ' 'location will be listed.', required=True), ]).AddToParser(parser) base.PAGE_SIZE_FLAG.SetDefault(parser, 100) parser.display_info.AddFormat(""" table( name.basename(), name.scope().segment(-3):label=ISSUER, name.scope().segment(-5):label=LOCATION, revocation_details.yesno(yes="REVOKED", no="ACTIVE"):label=REVOCATION_STATUS, certificate_description.subject_description.not_before_time():label=NOT_BEFORE, certificate_description.subject_description.not_after_time():label=NOT_AFTER) """) parser.display_info.AddTransforms({ 'not_before_time': text_utils.TransformNotBeforeTime, 'not_after_time': text_utils.TransformNotAfterTime }) parser.display_info.AddUriFunc( resource_utils.MakeGetUriFunc( 'privateca.projects.locations.certificateAuthorities.certificates' ))