Skip to content

Commit

Permalink
Allow digit-only/digit-prefixed hostnames (#105)
Browse files Browse the repository at this point in the history
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
  • Loading branch information
kke committed Jun 14, 2023
1 parent cadcf2e commit 99228df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

// SSH describes an SSH connection
type SSH struct {
Address string `yaml:"address" validate:"required,hostname|ip"`
Address string `yaml:"address" validate:"required,hostname_rfc1123|ip"`
User string `yaml:"user" validate:"required" default:"root"`
Port int `yaml:"port" default:"22" validate:"gt=0,lte=65535"`
KeyPath *string `yaml:"keyPath" validate:"omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions winrm.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

// WinRM describes a WinRM connection with its configuration options
type WinRM struct {
Address string `yaml:"address" validate:"required,hostname|ip"`
Address string `yaml:"address" validate:"required,hostname_rfc1123|ip"`
User string `yaml:"user" validate:"omitempty,gt=2" default:"Administrator"`
Port int `yaml:"port" default:"5985" validate:"gt=0,lte=65535"`
Password string `yaml:"password,omitempty"`
Expand All @@ -27,7 +27,7 @@ type WinRM struct {
CACertPath string `yaml:"caCertPath,omitempty" validate:"omitempty,file"`
CertPath string `yaml:"certPath,omitempty" validate:"omitempty,file"`
KeyPath string `yaml:"keyPath,omitempty" validate:"omitempty,file"`
TLSServerName string `yaml:"tlsServerName,omitempty" validate:"omitempty,hostname|ip"`
TLSServerName string `yaml:"tlsServerName,omitempty" validate:"omitempty,hostname_rfc1123|ip"`
Bastion *SSH `yaml:"bastion,omitempty"`

name string
Expand Down

0 comments on commit 99228df

Please sign in to comment.