Commit 7a311c56 authored by Petr Pudlak's avatar Petr Pudlak
Browse files

Remove GanetiContext reference from ConfigWriter



It was only required for RPC calls, which are now handled by WConfD.
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent c593d9c8
......@@ -46,7 +46,6 @@ from ganeti import errors
from ganeti import locking
from ganeti import utils
from ganeti import constants
import ganeti.rpc.node as rpc
import ganeti.wconfd as wc
from ganeti import objects
from ganeti import serializer
......@@ -244,25 +243,12 @@ class ConfigWriter(object):
# file than after it was modified
self._my_hostname = netutils.Hostname.GetSysName()
self._cfg_id = None
self._context = None
self._wconfd = None
self._OpenConfig(accept_foreign)
def _ConfigData(self):
return self._config_data
def _GetRpc(self, address_list):
"""Returns RPC runner for configuration.
"""
return rpc.ConfigRunner(self._context, address_list)
def SetContext(self, context):
"""Sets Ganeti context.
"""
self._context = context
# this method needs to be static, so that we can call it on the class
@staticmethod
def IsCluster():
......
......@@ -470,8 +470,6 @@ class GanetiContext(object):
[inst.name for inst in self.cfg.GetAllInstancesInfo().values()],
self.cfg.GetNetworkList())
self.cfg.SetContext(self)
# RPC runner
self.rpc = rpc.RpcRunner(self.cfg, self.glm.AddToLockMonitor)
......
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