Beispiel #1
0
    def Args(parser):
        parser.add_argument('POLICY_ID',
                            type=str,
                            help='ID of the guest policy to update.')
        osconfig_utils.AddFolderAndOrgArgs(parser, 'guest policy', 'to update')

        update_group = parser.add_group(help='The update component.',
                                        required=True)
        update_group.add_argument('--file',
                                  help="""\
        The JSON or YAML file with the updated guest policy.

        If this file specifies an "etag" value, the update will succeed only if
        the policy already in place matches that etag. A policy in a file that
        does not contain an etag value will simply replace the existing policy.
        """)
        update_group.add_argument('--description',
                                  type=str,
                                  help="""\
        Description of the guest policy to update. Length of the description is
        limited to 1024 characters.

        If specified, it will override any description provided in the file."""
                                  )
        parser.add_argument('--etag',
                            type=str,
                            help="""\
        The etag value of the guest policy to update.

        If specified, it will override any etag provided in the file, and the
        update will succeed only if the policy already in place matches this
        etag.""")
Beispiel #2
0
 def Args(parser):
     osconfig_utils.AddFolderAndOrgArgs(parser, 'guest policies', 'to list')
     parser.display_info.AddFormat("""
       table(
         name.basename(),
         description(),
         create_time,
         update_time
       )
     """)
     parser.display_info.AddTransforms(
         {'description': _TransformGuestPolicyDescription})
     parser.display_info.AddUriFunc(_MakeGetUriFunc())
Beispiel #3
0
    def Args(parser):
        parser.add_argument('POLICY_ID',
                            type=str,
                            help="""\
        ID of the guest policy to create.

        This ID must contain only lowercase letters, numbers, and hyphens, start
        with a letter, end with a number or a letter, be between 1-63
        characters, and unique within the project, folder, or organization.""")
        parser.add_argument(
            '--file',
            required=True,
            help='The JSON or YAML file with the guest policy to create.')
        parser.add_argument('--description',
                            type=str,
                            help="""\
        Description of the guest policy to create. Length of the description is
        limited to 1024 characters.

        If specified, it will override any description provided in the file."""
                            )
        osconfig_utils.AddFolderAndOrgArgs(parser, 'guest policy', 'to create')
Beispiel #4
0
 def Args(parser):
   parser.add_argument(
       'POLICY_ID', type=str, help='ID of the guest policy to delete.')
   osconfig_utils.AddFolderAndOrgArgs(parser, 'guest policy', 'to delete')