pa_api.xmlapi.types.config.rules.security
1from typing import Literal, Optional 2 3from pydantic import AliasPath, ConfigDict, Field 4 5from pa_api.xmlapi.types.utils import List, String, XMLBaseModel 6 7 8class ProfileSetting(XMLBaseModel): 9 groups: List[String] = Field( 10 validation_alias=AliasPath("group", "member"), default_factory=list 11 ) 12 13 14class Option(XMLBaseModel): 15 disable_server_response_inspection: Optional[bool] = Field( 16 validation_alias="disable-server-response-inspection", default=None 17 ) 18 19 20class Target(XMLBaseModel): 21 negate: Optional[bool] = None 22 23 24class Security(XMLBaseModel): 25 model_config = ConfigDict(extra="allow") 26 27 name: String = Field(validation_alias="@name") 28 uuid: String = Field(validation_alias="@uuid") 29 disabled: Optional[bool] = None 30 31 action: Literal["allow", "deny", "reset-client"] 32 33 to: List[String] = Field( 34 validation_alias=AliasPath("to", "member"), default_factory=list 35 ) 36 from_: List[String] = Field( 37 validation_alias=AliasPath("from", "member"), default_factory=list 38 ) 39 sources: List[String] = Field( 40 validation_alias=AliasPath("source", "member"), default_factory=list 41 ) 42 destinations: List[String] = Field( 43 validation_alias=AliasPath("destination", "member"), default_factory=list 44 ) 45 source_users: List[String] = Field( 46 validation_alias=AliasPath("source-user", "member"), default_factory=list 47 ) 48 services: List[String] = Field( 49 validation_alias=AliasPath("service", "member"), default_factory=list 50 ) 51 applications: List[String] = Field( 52 validation_alias=AliasPath("application", "member"), default_factory=list 53 ) 54 55 description: String = "" 56 categories: List[String] = Field( 57 validation_alias=AliasPath("category", "member"), default_factory=list 58 ) 59 tags: List[String] = Field( 60 validation_alias=AliasPath("tag", "member"), default_factory=list 61 ) 62 group_tag: Optional[String] = Field(validation_alias="group-tag", default=None) 63 64 profile_settings: List[ProfileSetting] = Field( 65 validation_alias=AliasPath("profile-settings"), default_factory=list 66 ) 67 target: Optional[Target] = Field(validation_alias=AliasPath("target"), default=None) 68 69 option: Optional[Option] = Field(default=None) 70 rule_type: Optional[str] = Field(validation_alias="rule-type", default=None) 71 negate_source: Optional[bool] = Field( 72 validation_alias="negate-source", default=None 73 ) 74 negate_destination: Optional[bool] = Field( 75 validation_alias="negate-destination", default=None 76 ) 77 log_settings: Optional[str] = Field(validation_alias="log-settings", default=None) 78 log_start: Optional[bool] = Field(validation_alias="log-start", default=None) 79 log_end: Optional[bool] = Field(validation_alias="log-end", default=None) 80 icmp_unreachable: Optional[bool] = Field( 81 validation_alias="icmp-unreachable", default=None 82 )
9class ProfileSetting(XMLBaseModel): 10 groups: List[String] = Field( 11 validation_alias=AliasPath("group", "member"), default_factory=list 12 )
Usage docs: https://docs.pydantic.dev/2.9/concepts/models/
A base class for creating Pydantic models.
Attributes:
__class_vars__: The names of the class variables defined on the model.
__private_attributes__: Metadata about the private attributes of the model.
__signature__: The synthesized __init__
[Signature
][inspect.Signature] of the model.
__pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
__pydantic_core_schema__: The core schema of the model.
__pydantic_custom_init__: Whether the model has a custom `__init__` function.
__pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces `Model.__validators__` and `Model.__root_validators__` from Pydantic V1.
__pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
__args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
__pydantic_post_init__: The name of the post-init method for the model, if defined.
__pydantic_root_model__: Whether the model is a [`RootModel`][pydantic.root_model.RootModel].
__pydantic_serializer__: The `pydantic-core` `SchemaSerializer` used to dump instances of the model.
__pydantic_validator__: The `pydantic-core` `SchemaValidator` used to validate instances of the model.
__pydantic_extra__: A dictionary containing extra values, if [`extra`][pydantic.config.ConfigDict.extra]
is set to `'allow'`.
__pydantic_fields_set__: The names of fields explicitly set during instantiation.
__pydantic_private__: Values of private attributes set on the model instance.
Configuration for the model, should be a dictionary conforming to [ConfigDict
][pydantic.config.ConfigDict].
Metadata about the fields defined on the model,
mapping of field names to [FieldInfo
][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__
from Pydantic V1.
A dictionary of computed field names and their corresponding ComputedFieldInfo
objects.
Inherited Members
- pydantic.main.BaseModel
- BaseModel
- model_extra
- model_fields_set
- model_construct
- model_copy
- model_dump
- model_dump_json
- model_json_schema
- model_parametrized_name
- model_post_init
- model_rebuild
- model_validate
- model_validate_json
- model_validate_strings
- dict
- json
- parse_obj
- parse_raw
- parse_file
- from_orm
- construct
- copy
- schema
- schema_json
- validate
- update_forward_refs
15class Option(XMLBaseModel): 16 disable_server_response_inspection: Optional[bool] = Field( 17 validation_alias="disable-server-response-inspection", default=None 18 )
Usage docs: https://docs.pydantic.dev/2.9/concepts/models/
A base class for creating Pydantic models.
Attributes:
__class_vars__: The names of the class variables defined on the model.
__private_attributes__: Metadata about the private attributes of the model.
__signature__: The synthesized __init__
[Signature
][inspect.Signature] of the model.
__pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
__pydantic_core_schema__: The core schema of the model.
__pydantic_custom_init__: Whether the model has a custom `__init__` function.
__pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces `Model.__validators__` and `Model.__root_validators__` from Pydantic V1.
__pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
__args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
__pydantic_post_init__: The name of the post-init method for the model, if defined.
__pydantic_root_model__: Whether the model is a [`RootModel`][pydantic.root_model.RootModel].
__pydantic_serializer__: The `pydantic-core` `SchemaSerializer` used to dump instances of the model.
__pydantic_validator__: The `pydantic-core` `SchemaValidator` used to validate instances of the model.
__pydantic_extra__: A dictionary containing extra values, if [`extra`][pydantic.config.ConfigDict.extra]
is set to `'allow'`.
__pydantic_fields_set__: The names of fields explicitly set during instantiation.
__pydantic_private__: Values of private attributes set on the model instance.
Configuration for the model, should be a dictionary conforming to [ConfigDict
][pydantic.config.ConfigDict].
Metadata about the fields defined on the model,
mapping of field names to [FieldInfo
][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__
from Pydantic V1.
A dictionary of computed field names and their corresponding ComputedFieldInfo
objects.
Inherited Members
- pydantic.main.BaseModel
- BaseModel
- model_extra
- model_fields_set
- model_construct
- model_copy
- model_dump
- model_dump_json
- model_json_schema
- model_parametrized_name
- model_post_init
- model_rebuild
- model_validate
- model_validate_json
- model_validate_strings
- dict
- json
- parse_obj
- parse_raw
- parse_file
- from_orm
- construct
- copy
- schema
- schema_json
- validate
- update_forward_refs
Usage docs: https://docs.pydantic.dev/2.9/concepts/models/
A base class for creating Pydantic models.
Attributes:
__class_vars__: The names of the class variables defined on the model.
__private_attributes__: Metadata about the private attributes of the model.
__signature__: The synthesized __init__
[Signature
][inspect.Signature] of the model.
__pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
__pydantic_core_schema__: The core schema of the model.
__pydantic_custom_init__: Whether the model has a custom `__init__` function.
__pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces `Model.__validators__` and `Model.__root_validators__` from Pydantic V1.
__pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
__args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
__pydantic_post_init__: The name of the post-init method for the model, if defined.
__pydantic_root_model__: Whether the model is a [`RootModel`][pydantic.root_model.RootModel].
__pydantic_serializer__: The `pydantic-core` `SchemaSerializer` used to dump instances of the model.
__pydantic_validator__: The `pydantic-core` `SchemaValidator` used to validate instances of the model.
__pydantic_extra__: A dictionary containing extra values, if [`extra`][pydantic.config.ConfigDict.extra]
is set to `'allow'`.
__pydantic_fields_set__: The names of fields explicitly set during instantiation.
__pydantic_private__: Values of private attributes set on the model instance.
Configuration for the model, should be a dictionary conforming to [ConfigDict
][pydantic.config.ConfigDict].
Metadata about the fields defined on the model,
mapping of field names to [FieldInfo
][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__
from Pydantic V1.
A dictionary of computed field names and their corresponding ComputedFieldInfo
objects.
Inherited Members
- pydantic.main.BaseModel
- BaseModel
- model_extra
- model_fields_set
- model_construct
- model_copy
- model_dump
- model_dump_json
- model_json_schema
- model_parametrized_name
- model_post_init
- model_rebuild
- model_validate
- model_validate_json
- model_validate_strings
- dict
- json
- parse_obj
- parse_raw
- parse_file
- from_orm
- construct
- copy
- schema
- schema_json
- validate
- update_forward_refs
25class Security(XMLBaseModel): 26 model_config = ConfigDict(extra="allow") 27 28 name: String = Field(validation_alias="@name") 29 uuid: String = Field(validation_alias="@uuid") 30 disabled: Optional[bool] = None 31 32 action: Literal["allow", "deny", "reset-client"] 33 34 to: List[String] = Field( 35 validation_alias=AliasPath("to", "member"), default_factory=list 36 ) 37 from_: List[String] = Field( 38 validation_alias=AliasPath("from", "member"), default_factory=list 39 ) 40 sources: List[String] = Field( 41 validation_alias=AliasPath("source", "member"), default_factory=list 42 ) 43 destinations: List[String] = Field( 44 validation_alias=AliasPath("destination", "member"), default_factory=list 45 ) 46 source_users: List[String] = Field( 47 validation_alias=AliasPath("source-user", "member"), default_factory=list 48 ) 49 services: List[String] = Field( 50 validation_alias=AliasPath("service", "member"), default_factory=list 51 ) 52 applications: List[String] = Field( 53 validation_alias=AliasPath("application", "member"), default_factory=list 54 ) 55 56 description: String = "" 57 categories: List[String] = Field( 58 validation_alias=AliasPath("category", "member"), default_factory=list 59 ) 60 tags: List[String] = Field( 61 validation_alias=AliasPath("tag", "member"), default_factory=list 62 ) 63 group_tag: Optional[String] = Field(validation_alias="group-tag", default=None) 64 65 profile_settings: List[ProfileSetting] = Field( 66 validation_alias=AliasPath("profile-settings"), default_factory=list 67 ) 68 target: Optional[Target] = Field(validation_alias=AliasPath("target"), default=None) 69 70 option: Optional[Option] = Field(default=None) 71 rule_type: Optional[str] = Field(validation_alias="rule-type", default=None) 72 negate_source: Optional[bool] = Field( 73 validation_alias="negate-source", default=None 74 ) 75 negate_destination: Optional[bool] = Field( 76 validation_alias="negate-destination", default=None 77 ) 78 log_settings: Optional[str] = Field(validation_alias="log-settings", default=None) 79 log_start: Optional[bool] = Field(validation_alias="log-start", default=None) 80 log_end: Optional[bool] = Field(validation_alias="log-end", default=None) 81 icmp_unreachable: Optional[bool] = Field( 82 validation_alias="icmp-unreachable", default=None 83 )
Usage docs: https://docs.pydantic.dev/2.9/concepts/models/
A base class for creating Pydantic models.
Attributes:
__class_vars__: The names of the class variables defined on the model.
__private_attributes__: Metadata about the private attributes of the model.
__signature__: The synthesized __init__
[Signature
][inspect.Signature] of the model.
__pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
__pydantic_core_schema__: The core schema of the model.
__pydantic_custom_init__: Whether the model has a custom `__init__` function.
__pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces `Model.__validators__` and `Model.__root_validators__` from Pydantic V1.
__pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
__args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
__pydantic_post_init__: The name of the post-init method for the model, if defined.
__pydantic_root_model__: Whether the model is a [`RootModel`][pydantic.root_model.RootModel].
__pydantic_serializer__: The `pydantic-core` `SchemaSerializer` used to dump instances of the model.
__pydantic_validator__: The `pydantic-core` `SchemaValidator` used to validate instances of the model.
__pydantic_extra__: A dictionary containing extra values, if [`extra`][pydantic.config.ConfigDict.extra]
is set to `'allow'`.
__pydantic_fields_set__: The names of fields explicitly set during instantiation.
__pydantic_private__: Values of private attributes set on the model instance.
Configuration for the model, should be a dictionary conforming to [ConfigDict
][pydantic.config.ConfigDict].
Metadata about the fields defined on the model,
mapping of field names to [FieldInfo
][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__
from Pydantic V1.
A dictionary of computed field names and their corresponding ComputedFieldInfo
objects.
Inherited Members
- pydantic.main.BaseModel
- BaseModel
- model_extra
- model_fields_set
- model_construct
- model_copy
- model_dump
- model_dump_json
- model_json_schema
- model_parametrized_name
- model_post_init
- model_rebuild
- model_validate
- model_validate_json
- model_validate_strings
- dict
- json
- parse_obj
- parse_raw
- parse_file
- from_orm
- construct
- copy
- schema
- schema_json
- validate
- update_forward_refs