GafaelfawrUserInfo

pydantic model controller.models.domain.gafaelfawr.GafaelfawrUserInfo

User metadata from Gafaelfawr.

Parameters:

data (Any)

Show JSON schema
{
   "title": "GafaelfawrUserInfo",
   "description": "User metadata from Gafaelfawr.",
   "type": "object",
   "properties": {
      "username": {
         "examples": [
            "ribbon"
         ],
         "pattern": "^[a-z0-9](?:[a-z0-9]|-[a-z0-9])*[a-z](?:[a-z0-9]|-[a-z0-9])*$",
         "title": "Username for Lab user",
         "type": "string"
      },
      "name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "May contain spaces, capital letters, and non-ASCII characters. Should be the user's preferred representation of their name to other humans.",
         "examples": [
            "Ribbon"
         ],
         "title": "Human-friendly display name for user"
      },
      "uid": {
         "description": "32-bit unsigned integer",
         "examples": [
            1104
         ],
         "title": "Numeric UID for user (POSIX)",
         "type": "integer"
      },
      "gid": {
         "description": "32-bit unsigned integer",
         "examples": [
            1104
         ],
         "title": "Numeric GID for user's primary group (POSIX)",
         "type": "integer"
      },
      "groups": {
         "default": [],
         "items": {
            "$ref": "#/$defs/UserGroup"
         },
         "title": "User's group memberships",
         "type": "array"
      },
      "quota": {
         "anyOf": [
            {
               "$ref": "#/$defs/UserQuota"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "User's quotas"
      }
   },
   "$defs": {
      "NotebookQuota": {
         "description": "Notebook Aspect quota information for a user.",
         "properties": {
            "cpu": {
               "examples": [
                  4.0
               ],
               "title": "CPU equivalents",
               "type": "number"
            },
            "memory": {
               "examples": [
                  16.0
               ],
               "title": "Maximum memory use (GiB)",
               "type": "number"
            }
         },
         "required": [
            "cpu",
            "memory"
         ],
         "title": "NotebookQuota",
         "type": "object"
      },
      "UserGroup": {
         "description": "Gafaelfawr's representation of a single group.",
         "properties": {
            "name": {
               "description": "Should follow Unix naming conventions",
               "examples": [
                  "ferrymen"
               ],
               "pattern": "^[a-zA-Z][a-zA-Z0-9._-]*$",
               "title": "Group to which lab user belongs",
               "type": "string"
            },
            "id": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "32-bit unsigned integer",
               "examples": [
                  2023
               ],
               "title": "Numeric GID of the group (POSIX)"
            }
         },
         "required": [
            "name"
         ],
         "title": "UserGroup",
         "type": "object"
      },
      "UserQuota": {
         "description": "Quota information for a user.",
         "properties": {
            "api": {
               "additionalProperties": {
                  "type": "integer"
               },
               "default": {},
               "description": "Mapping of service names to allowed requests per 15 minutes.",
               "examples": [
                  {
                     "datalinker": 500,
                     "hips": 2000,
                     "tap": 500,
                     "vo-cutouts": 100
                  }
               ],
               "title": "API quotas",
               "type": "object"
            },
            "notebook": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/NotebookQuota"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Notebook Aspect quotas"
            }
         },
         "title": "UserQuota",
         "type": "object"
      }
   },
   "required": [
      "username",
      "uid",
      "gid"
   ]
}

Fields:
field gid: int [Required]

32-bit unsigned integer

field groups: list[UserGroup] = []
field name: str | None = None

May contain spaces, capital letters, and non-ASCII characters. Should be the user’s preferred representation of their name to other humans.

field quota: UserQuota | None = None
field uid: int [Required]

32-bit unsigned integer

field username: str [Required]
Constraints:
  • pattern = ^[a-z0-9](?:[a-z0-9]|-[a-z0-9])*[a-z](?:[a-z0-9]|-[a-z0-9])*$

groups_json()

Group membership serialized to JSON.

Groups without GIDs are omitted since we can’t do anything with them in the context of a user lab.

Return type:

str

property supplemental_groups: list[int]

Supplemental GIDs.