Yaniv Bronhaim has uploaded a new change for review. Change subject: Add discovered IP address to provision call ......................................................................
Add discovered IP address to provision call In later patch we add to the vds address field the fqdn of the discovered host before the host is provisioned. in the provision call foreman needs the original discovered IP address. Therefore this patch saves the ip and pass it when the provision call is done. Change-Id: I915ed42da851a60a6480f68735b005ab4c3f4a4b Signed-off-by: Yaniv Bronhaim <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/HostProviderProxy.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVdsActionParameters.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java 5 files changed, 14 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/24/35324/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java index ebd2a8b..34335bd 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java @@ -135,7 +135,8 @@ getParameters().getComputeResource(), getParameters().getHostMac(), getParameters().getDiscoverName(), - getParameters().getPassword() + getParameters().getPassword(), + getParameters().getDiscoverIp() ); AuditLogableBase logable = new AuditLogableBase(); diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/HostProviderProxy.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/HostProviderProxy.java index eca85f0..c76db66 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/HostProviderProxy.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/HostProviderProxy.java @@ -21,5 +21,6 @@ ExternalComputeResource computeResource, String mac, String discoverName, - String rootPassword); + String rootPassword, + String ip); } diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java index 0969926..e437e5b 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/host/provider/foreman/ForemanHostProviderProxy.java @@ -248,7 +248,8 @@ ExternalComputeResource computeResource, String mac, String discoverName, - String rootPassword) { + String rootPassword, + String ip) { final String entityBody = "{\n" + " \"discovered_host\": {\n" + " \"name\": \"" + vds.getName() + "\",\n" + @@ -257,7 +258,7 @@ " \"mac\": \"" + mac + "\",\n" + " \"domain_id\": \"" + hg.getDomainId() + "\",\n" + " \"subnet_id\": \"" + hg.getSubnetId() + "\",\n" + - " \"ip\": \"" + vds.getHostName() + "\",\n" + + " \"ip\": \"" + ip + "\",\n" + " \"architecture_id\": \"" + hg.getArchitectureId() + "\",\n" + " \"operatingsystem_id\": \"" + hg.getOsId() + "\",\n" + " \"medium_id\": \"" + hg.getMediumId() + "\",\n" + diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVdsActionParameters.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVdsActionParameters.java index 52bbdf4..a3ad631 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVdsActionParameters.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVdsActionParameters.java @@ -17,6 +17,8 @@ private String hostMac; private String discoverName; private ExternalComputeResource computeResource; + private String discoverIp; + public String getDiscoverIp() { return discoverIp; } public Guid getProviderId() { return providerId; }; public ExternalHostGroup getHostGroup() { return hostGroup; }; public String getHostMac() { return hostMac; }; @@ -33,13 +35,15 @@ ExternalHostGroup hg, ExternalComputeResource cr, String mac, - String discover_name) { + String discover_name, + String discover_ip) { privateAddProvisioned = true; hostMac = mac; hostGroup = hg; providerId = pid; discoverName = discover_name; computeResource = cr; + discoverIp = discover_ip; } public boolean getAddProvisioned() { diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java index fe06555..7cfaba4 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java @@ -1031,7 +1031,8 @@ hostGroup, computeResource, discoveredHost.getMac(), - discoveredHost.getName()); + discoveredHost.getName(), + discoveredHost.getIp()); } Frontend.getInstance().runAction(VdcActionType.AddVds, parameters, -- To view, visit http://gerrit.ovirt.org/35324 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I915ed42da851a60a6480f68735b005ab4c3f4a4b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yaniv Bronhaim <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
