Skip to main content

GlobalProtect Infrastructure Settings Models

Overview

The GlobalProtect Infrastructure Settings models provide a structured way to manage the network infrastructure configuration for mobile users in Palo Alto Networks' Strata Cloud Manager: DNS servers, IP pools, the portal hostname, WINS, UDP query retries, and static IP pools. The models handle validation of inputs and outputs when interacting with the SCM API.

Models

The module provides the following Pydantic models:

  • InfrastructureSettingsBaseModel: Base model with fields common to all infrastructure settings operations
  • InfrastructureSettingsCreateModel: Model for creating new infrastructure settings
  • InfrastructureSettingsUpdateModel: Model for updating existing infrastructure settings (addressed by name, not ID)
  • InfrastructureSettingsResponseModel: Response model, adds the read-only id field

Supporting models:

  • DnsServerEntry: DNS server entry (dns_suffix, internal_dns_match, public DNS servers)
  • InternalDnsMatch / DnsServerSelection: Internal DNS resolution rules
  • PublicDnsServer: Primary/secondary public DNS server
  • EnableWins / EnableWinsYes / WinsServerEntry: WINS configuration (yes/no choice)
  • IpPool: IP pool entry
  • PortalHostname / CustomDomain / DefaultDomain: Portal hostname configuration
  • UdpQueries / UdpQueryRetries: UDP query retry configuration
  • StaticIpPool / UserGroup: Static IP pool entries

Request models use extra="forbid"; the response model uses extra="ignore".

note

The folder ("Mobile Users") is a query parameter on this endpoint, not a body field, so it does not appear on these models. The service class handles it.

Attributes

AttributeTypeRequiredDefaultDescription
namestrYesNoneName of the infrastructure settings
dns_serversList[DnsServerEntry]YesNoneDNS server entries
ip_poolsList[IpPool]YesNoneIP pools for mobile users
portal_hostnamePortalHostnameYesNonePortal hostname (custom or default domain)
enable_winsEnableWinsNoNoneWINS configuration (yes/no choice)
ipv6boolNoNoneWhether IPv6 is enabled
udp_queriesUdpQueriesNoNoneUDP query retry configuration
static_ip_poolsList[StaticIpPool]NoNoneStatic IP pools
idUUIDYes**NoneUUID of the resource

** Response model only (read-only field)

StaticIpPool Attributes

AttributeTypeRequiredDescription
namestrNoPool entry name (max 128 chars)
pool_type"Static-IP"NoPool type (only Static-IP is valid)
ip_poolList[str]NoIP subnets (CIDR)
theatresList[str]NoIP pools on theatres
usersList[str]NoIP pools on users
user_groupsList[UserGroup]NoIP pools on user groups (DN max 320 chars)

UdpQueryRetries Attributes

AttributeTypeConstraintsDescription
attemptsint1-30Maximum retries before trying the next name server
intervalint1-30Time in seconds for another request to be sent

Exceptions

The Infrastructure Settings models can raise the following exceptions during validation:

  • ValueError / ValidationError: Raised in several scenarios:
    • When required fields (name, dns_servers, ip_pools, portal_hostname) are missing
    • When pool_type is not "Static-IP"
    • When attempts or interval are outside the 1-30 range
    • When unknown fields are passed to request models (extra="forbid")

Usage Examples

Creating an Infrastructure Settings Model

from scm.models.mobile_agent import InfrastructureSettingsCreateModel

infra = InfrastructureSettingsCreateModel(
name="mobile-users-infra",
dns_servers=[
{
"name": "dns-config",
"dns_suffix": ["example.com"],
"primary_public_dns": {"dns_server": "8.8.8.8"},
}
],
ip_pools=[{"name": "ip-pool-1", "ip_pool": ["10.10.0.0/16"]}],
portal_hostname={"default_domain": {"hostname": "acme"}},
)

payload = infra.model_dump(exclude_unset=True)

Static IP Pools

from scm.models.mobile_agent import StaticIpPool

pool = StaticIpPool(
name="branch-pool",
pool_type="Static-IP",
ip_pool=["10.1.0.0/24"],
user_groups=[{"name": "cn=engineering,dc=example,dc=com", "directory": "ldap"}],
)