v1.12.9
This commit is contained in:
126
pkg/sdn/secpolicies/models.go
Normal file
126
pkg/sdn/secpolicies/models.go
Normal file
@@ -0,0 +1,126 @@
|
||||
package secpolicies
|
||||
|
||||
type SecurityPolicyList []SecurityPolicySummary
|
||||
|
||||
// SecurityPolicySummary provides brief information about the security policy
|
||||
type SecurityPolicySummary struct {
|
||||
// Access group ID
|
||||
AccessGroupID string `json:"access_group_id"`
|
||||
|
||||
// Access group name
|
||||
AccessGroupName string `json:"access_group_name"`
|
||||
|
||||
// Applied to network object group ID
|
||||
AppliedToNetObjectGroupID string `json:"applied_to_net_object_group_id"`
|
||||
|
||||
// Created time
|
||||
CreatedAt string `json:"created_at"`
|
||||
|
||||
// Description
|
||||
Description string `json:"description"`
|
||||
|
||||
// Display name
|
||||
DisplayName string `json:"display_name"`
|
||||
|
||||
// Enabled flag
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
// End priority
|
||||
EndPriority int `json:"end_priority"`
|
||||
|
||||
// ID
|
||||
ID string `json:"id"`
|
||||
|
||||
// Security rules
|
||||
SecurityRules []SecurityRule `json:"security_rules"`
|
||||
|
||||
// Start priority
|
||||
StartPriority int `json:"start_priority"`
|
||||
|
||||
// Status information
|
||||
Status Status `json:"status"`
|
||||
|
||||
// Version ID
|
||||
VersionID uint64 `json:"version_id"`
|
||||
|
||||
// Updated time
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
// Status information
|
||||
type Status struct {
|
||||
// Common status
|
||||
Common string `json:"common"`
|
||||
|
||||
// Hypervisor statuses
|
||||
Hypervisors []HypervisorStatus `json:"hypervisors"`
|
||||
}
|
||||
|
||||
// HypervisorStatus information
|
||||
type HypervisorStatus struct {
|
||||
// Status
|
||||
Status string `json:"status"`
|
||||
|
||||
// Name
|
||||
Name string `json:"name"`
|
||||
|
||||
// Display name
|
||||
DisplayName string `json:"display_name"`
|
||||
|
||||
// Hypervisor status
|
||||
HypervisorStatus string `json:"hypervisor_status"`
|
||||
|
||||
// Last sync time
|
||||
SyncedAt string `json:"synced_at"`
|
||||
}
|
||||
|
||||
// Security rules
|
||||
type SecurityRule struct {
|
||||
// Access group ID
|
||||
AccessGroupID string `json:"access_group_id"`
|
||||
|
||||
// Action to take (Allow, Deny, etc.)
|
||||
Action string `json:"action"`
|
||||
|
||||
// Description
|
||||
Description string `json:"description"`
|
||||
|
||||
// Traffic direction (Ingress, Egress)
|
||||
Direction string `json:"direction"`
|
||||
|
||||
// Display name
|
||||
DisplayName string `json:"display_name"`
|
||||
|
||||
// Enabled flag
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
// Filter criteria
|
||||
Filter Filter `json:"filter"`
|
||||
|
||||
// ID
|
||||
ID string `json:"id"`
|
||||
|
||||
// Log enabled flag
|
||||
LogEnabled bool `json:"log_enabled"`
|
||||
|
||||
// Log severity level
|
||||
LogSeverity string `json:"log_severity"`
|
||||
|
||||
// Priority
|
||||
Priority int `json:"priority"`
|
||||
|
||||
// Security policy ID
|
||||
SecurityPolicyID string `json:"security_policy_id"`
|
||||
|
||||
// Statistics enabled flag
|
||||
StatisticsEnabled bool `json:"statistics_enabled"`
|
||||
|
||||
// Version ID
|
||||
VersionID uint64 `json:"version_id"`
|
||||
}
|
||||
|
||||
// Filter represents the filter criteria for the security rule
|
||||
type Filter struct {
|
||||
// Filters map
|
||||
Filters map[string]interface{} `json:"filters"`
|
||||
}
|
||||
Reference in New Issue
Block a user