Logo Search packages:      
Sourcecode: ganeti version File versions  Download package

def lib::config::ConfigWriter::InitConfig (   self,
  node,
  primary_ip,
  secondary_ip,
  hostkeypub,
  mac_prefix,
  vg_name,
  def_bridge 
)

Create the initial cluster configuration.

It will contain the current node, which will also be the master
node, and no instances or operating systmes.

Args:
  node: the nodename of the initial node
  primary_ip: the IP address of the current host
  secondary_ip: the secondary IP of the current host or None
  hostkeypub: the public hostkey of this host

Definition at line 562 of file config.py.

                                                             :
    """Create the initial cluster configuration.

    It will contain the current node, which will also be the master
    node, and no instances or operating systmes.

    Args:
      node: the nodename of the initial node
      primary_ip: the IP address of the current host
      secondary_ip: the secondary IP of the current host or None
      hostkeypub: the public hostkey of this host

    """
    hu_port = constants.FIRST_DRBD_PORT - 1
    globalconfig = objects.Cluster(config_version=constants.CONFIG_VERSION,
                                   serial_no=1,
                                   rsahostkeypub=hostkeypub,
                                   highest_used_port=hu_port,
                                   mac_prefix=mac_prefix,
                                   volume_group_name=vg_name,
                                   default_bridge=def_bridge,
                                   tcpudp_port_pool=set())
    if secondary_ip is None:
      secondary_ip = primary_ip
    nodeconfig = objects.Node(name=node, primary_ip=primary_ip,
                              secondary_ip=secondary_ip)

    self._config_data = objects.ConfigData(nodes={node: nodeconfig},
                                           instances={},
                                           cluster=globalconfig)
    self._WriteConfig()

  def GetVGName(self):


Generated by  Doxygen 1.6.0   Back to index