Mike Kolesnik has posted comments on this change.
Change subject: core: add NetworkLinking support to RunVm command.
......................................................................
Patch Set 20: (5 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
Line 779: Set<String> clusterNetworksNames =
Entities.objectNames(clusterNetworks);
Line 780:
Line 781: // Checking that the interface are all configured
Line 782: // and they are attached to networks that are attached to the
cluster
Line 783: // and they are attached to VM networks
Removed, since it states exactly the method names so code is self-explanatory.
Line 784: return isVmInterfacesConfigured() &&
Line 785:
isVmInterfacesAttachedToClusterNetworks(clusterNetworksNames,
interfaceNetworkNames) &&
Line 786: isVmInterfacesAttachedToVmNetworks(clusterNetworks,
interfaceNetworkNames);
Line 787: }
Line 789: /**
Line 790: * Checking that the interfaces are all configured If network
linking is supported, interfaces with no network are
Line 791: * allowed. Otherwise, canDoAction should be thrown.
Line 792: *
Line 793: * @param interfaceNetworkNames
Done
Line 794: * VM interface network names
Line 795: * @return true if all VM network interfaces are attached to
existing cluster networks
Line 796: */
Line 797: private boolean isVmInterfacesConfigured() {
Line 791: * allowed. Otherwise, canDoAction should be thrown.
Line 792: *
Line 793: * @param interfaceNetworkNames
Line 794: * VM interface network names
Line 795: * @return true if all VM network interfaces are attached to
existing cluster networks
Done
Line 796: */
Line 797: private boolean isVmInterfacesConfigured() {
Line 798: for (VmNetworkInterface nic : getVm().getInterfaces()) {
Line 799: if (nic.getNetworkName() == null) {
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmNicValidator.java
Line 36: return !networkLinkingSupported(version) &&
nic.getNetworkName() == null
Line 37: ? new
ValidationResult(VdcBllMessages.NULL_NETWORK_IS_NOT_SUPPORTED, clusterVersion())
Line 38: : ValidationResult.VALID;
Line 39: }
Line 40:
I think this can be done in later patch since it's not critical for this change
Line 41: public static boolean networkLinkingSupported(String version) {
Line 42: return Config.<Boolean>
GetValue(ConfigValues.NetworkLinkingSupported, version);
Line 43: }
Line 44:
....................................................
Commit Message
Line 5: CommitDate: 2012-12-20 11:16:09 +0200
Line 6:
Line 7: core: add NetworkLinking support to RunVm command.
Line 8:
Line 9: - If "linked" property on VmNetworkInterface is true
Done
Line 10: 'linkState-> up' should be sent to the vdsm
Line 11: Otherwise-
Line 12: 'linkState-> down' should be sent to the vdsm
Line 13:
--
To view, visit http://gerrit.ovirt.org/9518
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9805b18c364685a6533b89cfa31ae0575a00ea5
Gerrit-PatchSet: 20
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Muli Salem <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches