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

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, \
ComputeIPolicyInstanceViolation, AnnotateDiskParams, SupportsOob, \
CheckIpolicyVsDiskTemplates, CheckDiskAccessModeValidity, \
CheckDiskAccessModeConsistency, CreateNewClientCert, \
OpAddInstanceCommunicationNetwork, OpConnectInstanceCommunicationNetwork
AddInstanceCommunicationNetworkOp, ConnectInstanceCommunicationNetworkOp
import ganeti.masterd.instance
......@@ -1392,7 +1392,7 @@ class LUClusterSetParams(LogicalUnit):
network_exists = False
if not network_exists:
jobs.append(OpAddInstanceCommunicationNetwork(network_name))
jobs.append(AddInstanceCommunicationNetworkOp(network_name))
for group_uuid in cfg.GetNodeGroupList():
group = cfg.GetNodeGroup(group_uuid)
......@@ -1407,7 +1407,7 @@ class LUClusterSetParams(LogicalUnit):
network_connected = False
if not network_connected:
op = OpConnectInstanceCommunicationNetwork(group_uuid, network_name)
op = ConnectInstanceCommunicationNetworkOp(group_uuid, network_name)
jobs.append(op)
if jobs:
......
......@@ -1287,8 +1287,8 @@ def CreateNewClientCert(lu, node_uuid, filename=None):
return new_digest
def OpAddInstanceCommunicationNetwork(network):
"""Create OpCode that adds the instance communication network.
def AddInstanceCommunicationNetworkOp(network):
"""Create an OpCode that adds the instance communication network.
This OpCode contains the configuration necessary for the instance
communication network.
......@@ -1312,9 +1312,9 @@ def OpAddInstanceCommunicationNetwork(network):
tags=[])
def OpConnectInstanceCommunicationNetwork(group_uuid, network):
"""Create OpCode that connects a group to the instance communication
network.
def ConnectInstanceCommunicationNetworkOp(group_uuid, network):
"""Create an OpCode that connects a group to the instance
communication network.
This OpCode contains the configuration necessary for the instance
communication network.
......
......@@ -37,7 +37,7 @@ from ganeti.cmdlib.common import MergeAndVerifyHvState, \
ComputeNewInstanceViolations, GetDefaultIAllocator, ShareAll, \
CheckInstancesNodeGroups, LoadNodeEvacResult, MapInstanceLvsToNodes, \
CheckIpolicyVsDiskTemplates, CheckDiskAccessModeValidity, \
CheckDiskAccessModeConsistency, OpConnectInstanceCommunicationNetwork
CheckDiskAccessModeConsistency, ConnectInstanceCommunicationNetworkOp
import ganeti.masterd.instance
......@@ -163,7 +163,7 @@ class LUGroupAdd(LogicalUnit):
network_exists = False
if network_exists:
op = OpConnectInstanceCommunicationNetwork(group_uuid, network_name)
op = ConnectInstanceCommunicationNetworkOp(group_uuid, network_name)
return ResultWithJobs([[op]])
else:
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