mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 18:08:42 -05:00
Connect domain settings to pools, create v2 API
This commit is contained in:
parent
7786c9193e
commit
6b9eb2369f
19 changed files with 3964 additions and 19 deletions
|
|
@ -184,6 +184,8 @@ module Vmpooler
|
|||
def hostname_shorten(hostname, domain=nil)
|
||||
if domain && hostname =~ /^[\w-]+\.#{domain}$/
|
||||
hostname = hostname[/[^.]+/]
|
||||
elsif hostname =~ /^[\w-]+\..+$/
|
||||
hostname = hostname[/[^.]+/]
|
||||
end
|
||||
|
||||
hostname
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue