add firewall rules option
This commit is contained in:
42
main.go
42
main.go
@@ -6,22 +6,34 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
type FirewallRule struct {
|
||||
Type string `yaml:"type"`
|
||||
Action string `yaml:"action"`
|
||||
Protocol string `yaml:"protocol"`
|
||||
Dport string `yaml:"dport"`
|
||||
Sport string `yaml:"sport"`
|
||||
Source string `yaml:"source"`
|
||||
Dest string `yaml:"dest"`
|
||||
Comment string `yaml:"comment"`
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
ImageURL string `yaml:"image_url"`
|
||||
VMName string `yaml:"vm_name"`
|
||||
VMID int `yaml:"vm_id"`
|
||||
Storage string `yaml:"storage"`
|
||||
Memory int `yaml:"memory"`
|
||||
Cores int `yaml:"cores"`
|
||||
DiskSize string `yaml:"disk_size"`
|
||||
Bridge string `yaml:"bridge"`
|
||||
VlanTag int `yaml:"vlan_tag"`
|
||||
SSHKey string `yaml:"ssh_key"`
|
||||
ProxmoxHost string `yaml:"proxmox_host"`
|
||||
ProxmoxUser string `yaml:"proxmox_user"`
|
||||
ProxmoxPass string `yaml:"proxmox_pass"`
|
||||
GuestAgent bool `yaml:"guest_agent"`
|
||||
Firewall bool `yaml:"firewall"`
|
||||
ImageURL string `yaml:"image_url"`
|
||||
VMName string `yaml:"vm_name"`
|
||||
VMID int `yaml:"vm_id"`
|
||||
Storage string `yaml:"storage"`
|
||||
Memory int `yaml:"memory"`
|
||||
Cores int `yaml:"cores"`
|
||||
DiskSize string `yaml:"disk_size"`
|
||||
Bridge string `yaml:"bridge"`
|
||||
VlanTag int `yaml:"vlan_tag"`
|
||||
SSHKey string `yaml:"ssh_key"`
|
||||
ProxmoxHost string `yaml:"proxmox_host"`
|
||||
ProxmoxUser string `yaml:"proxmox_user"`
|
||||
ProxmoxPass string `yaml:"proxmox_pass"`
|
||||
GuestAgent bool `yaml:"guest_agent"`
|
||||
Firewall bool `yaml:"firewall"`
|
||||
FirewallRules []FirewallRule `yaml:"firewall_rules"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
Reference in New Issue
Block a user