Project

General

Profile

Actions

Support #8969

open

Send the host['ip'] variable to customization spec

Added by Amit Daniel over 9 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Compute resources - VMware
Target version:
-
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hey all .

I've been added ‘customization_spec’ in this file : /usr/share/foreman/app/models/compute_resources/foreman/model/vmware.rb to send custom ip , hostname to Vmware clone ( from template ) .

With static details like :

customization_spec' => {
'domain' => "mobimate.local",
'hostname' => args[:name].split('.',2)[0],
'ipsettings' => {
'ip' => “xxx.xxx.xxx.xxx",
'gateway' => [“xxx.xxx.xxx.xxx"],
'subnetMask' => “xxx.xxx.xxx.xxx”,

Everything is working fine.

I would like to know where is the View that we can get the IP that foreman automatically generated
I need to passed the ip to the ip variable in the customization_spec.

Thanks ,
Amit Daniel

Actions #1

Updated by Ohad Levy over 9 years ago

  • Priority changed from High to Normal

normally, its host.ip? BTW: the mailing list is much better medium for this kind of queries.

Actions #2

Updated by Amit Daniel over 9 years ago

Hey Ohad ,

Thanks for your answer .
Still i can't get the host.ip.

'customization_spec' => {
'domain' => "mobimate.local",
'hostname' => args[:name].split('.',2)[0],
'ipsettings' => { * 'ip' => host.ip ,
  • 'gateway' => ["xxx"],
    'subnetMask' => "xxx",
    },
    },

are you sure in the ip i just need to add host.ip ?

Thanks ,

Amit

Actions

Also available in: Atom PDF