cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rafaelweingartner <...@git.apache.org>
Subject [GitHub] cloudstack pull request #1878: CLOUDSTACK-9717: [VMware] RVRs have mismatchi...
Date Mon, 13 Mar 2017 14:57:07 GMT
Github user rafaelweingartner commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1878#discussion_r105677642
  
    --- Diff: plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
---
    @@ -2072,6 +2121,17 @@ protected StartAnswer execute(StartCommand cmd) {
         }
     
         /**
    +     * Update boot args with the new nic mac addresses.
    +     */
    +    protected String replaceNicsMacSequenceInBootArgs(String oldMacSequence, String newMacSequence,
VirtualMachineTO vmSpec) {
    +        String bootArgs = vmSpec.getBootArgs();
    +        if (!StringUtils.isEmpty(bootArgs) && !StringUtils.isEmpty(oldMacSequence)
&& !StringUtils.isEmpty(newMacSequence)) {
    +            return bootArgs.replace(oldMacSequence, newMacSequence);
    +        }
    +        return "";
    --- End diff --
    
    Is this case possible? `bootArgs` not empty and `oldMacSequence` or `newMacSequence` empty
    
    If so, would not it be better to return at line 2131 the variable `bootArgs`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message