Commit 4b75f8a4 authored by Jose A. Lopes's avatar Jose A. Lopes

Rename some functions not to collide with opcode names

Rename some functions related to instance communication not to collide
with the naming convention used in the opcodes.
Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent 2ff6426b
...@@ -57,7 +57,7 @@ from ganeti.cmdlib.common import ShareAll, RunPostHook, \ ...@@ -57,7 +57,7 @@ from ganeti.cmdlib.common import ShareAll, RunPostHook, \
ComputeIPolicyInstanceViolation, AnnotateDiskParams, SupportsOob, \ ComputeIPolicyInstanceViolation, AnnotateDiskParams, SupportsOob, \
CheckIpolicyVsDiskTemplates, CheckDiskAccessModeValidity, \ CheckIpolicyVsDiskTemplates, CheckDiskAccessModeValidity, \
CheckDiskAccessModeConsistency, CreateNewClientCert, \ CheckDiskAccessModeConsistency, CreateNewClientCert, \
OpAddInstanceCommunicationNetwork, OpConnectInstanceCommunicationNetwork AddInstanceCommunicationNetworkOp, ConnectInstanceCommunicationNetworkOp
import ganeti.masterd.instance import ganeti.masterd.instance
...@@ -1392,7 +1392,7 @@ class LUClusterSetParams(LogicalUnit): ...@@ -1392,7 +1392,7 @@ class LUClusterSetParams(LogicalUnit):
network_exists = False network_exists = False
if not network_exists: if not network_exists:
jobs.append(OpAddInstanceCommunicationNetwork(network_name)) jobs.append(AddInstanceCommunicationNetworkOp(network_name))
for group_uuid in cfg.GetNodeGroupList(): for group_uuid in cfg.GetNodeGroupList():
group = cfg.GetNodeGroup(group_uuid) group = cfg.GetNodeGroup(group_uuid)
...@@ -1407,7 +1407,7 @@ class LUClusterSetParams(LogicalUnit): ...@@ -1407,7 +1407,7 @@ class LUClusterSetParams(LogicalUnit):
network_connected = False network_connected = False
if not network_connected: if not network_connected:
op = OpConnectInstanceCommunicationNetwork(group_uuid, network_name) op = ConnectInstanceCommunicationNetworkOp(group_uuid, network_name)
jobs.append(op) jobs.append(op)
if jobs: if jobs:
......
...@@ -1287,8 +1287,8 @@ def CreateNewClientCert(lu, node_uuid, filename=None): ...@@ -1287,8 +1287,8 @@ def CreateNewClientCert(lu, node_uuid, filename=None):
return new_digest return new_digest
def OpAddInstanceCommunicationNetwork(network): def AddInstanceCommunicationNetworkOp(network):
"""Create OpCode that adds the instance communication network. """Create an OpCode that adds the instance communication network.
This OpCode contains the configuration necessary for the instance This OpCode contains the configuration necessary for the instance
communication network. communication network.
...@@ -1312,9 +1312,9 @@ def OpAddInstanceCommunicationNetwork(network): ...@@ -1312,9 +1312,9 @@ def OpAddInstanceCommunicationNetwork(network):
tags=[]) tags=[])
def OpConnectInstanceCommunicationNetwork(group_uuid, network): def ConnectInstanceCommunicationNetworkOp(group_uuid, network):
"""Create OpCode that connects a group to the instance communication """Create an OpCode that connects a group to the instance
network. communication network.
This OpCode contains the configuration necessary for the instance This OpCode contains the configuration necessary for the instance
communication network. communication network.
......
...@@ -37,7 +37,7 @@ from ganeti.cmdlib.common import MergeAndVerifyHvState, \ ...@@ -37,7 +37,7 @@ from ganeti.cmdlib.common import MergeAndVerifyHvState, \
ComputeNewInstanceViolations, GetDefaultIAllocator, ShareAll, \ ComputeNewInstanceViolations, GetDefaultIAllocator, ShareAll, \
CheckInstancesNodeGroups, LoadNodeEvacResult, MapInstanceLvsToNodes, \ CheckInstancesNodeGroups, LoadNodeEvacResult, MapInstanceLvsToNodes, \
CheckIpolicyVsDiskTemplates, CheckDiskAccessModeValidity, \ CheckIpolicyVsDiskTemplates, CheckDiskAccessModeValidity, \
CheckDiskAccessModeConsistency, OpConnectInstanceCommunicationNetwork CheckDiskAccessModeConsistency, ConnectInstanceCommunicationNetworkOp
import ganeti.masterd.instance import ganeti.masterd.instance
...@@ -163,7 +163,7 @@ class LUGroupAdd(LogicalUnit): ...@@ -163,7 +163,7 @@ class LUGroupAdd(LogicalUnit):
network_exists = False network_exists = False
if network_exists: if network_exists:
op = OpConnectInstanceCommunicationNetwork(group_uuid, network_name) op = ConnectInstanceCommunicationNetworkOp(group_uuid, network_name)
return ResultWithJobs([[op]]) return ResultWithJobs([[op]])
else: else:
return None return None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment