Gentoo Archives: gentoo-installer

From: Nathaniel McCallum <npmccallum@g.o>
To: gentoo-installer@l.g.o
Subject: [gentoo-installer] Complex data types in InstallProfile
Date: Thu, 12 Feb 2004 21:04:53
Message-Id: 1076619879.819.55.camel@luther.natemccallum.com
I'm not sure exactly how we should handle complex data types.  esammer
mentionded that we should try and stay away from defining new classes
for specific data types.  however, that may complicate things even
more.  Here are some of my thoughts for non-class oriented complex data
types:

PartitionDB:
{ <device1> : <partition table record (dict)>, <device2> : <partition
table record (dict)>, etc... }

'<device>' is a string that composes the 'major'. (ie. '/dev/hda')


Partition Table Record:
{ <minor> : <partition information (tuple)>,  <minor> : <partition
information (tuple)>, etc... }
minor is the number of the partition. (ie. '/dev/hda1' would be,
<device> == '/dev/hda' and <minor> == 1


Partition Information:
( <size in MB (int)>, <partition type (string)>, <mount point (string)>
)

Partition types consist of:
   'ext2', 'ext3', 'reiserfs', 'xfs', 'jfs', 'swap', 'extended', or
'nfs'.  More may be added later.

Mount point is where the partition/nfs-export should be mounted. (ie.
'/home' or '/usr/portage')
Mount point should not contain the liveCD prefix point (ie.
'/mnt/gentoo/home' is not correct)



NetDB:
{ <device1> : <device info (tuple)>, <device2> : <device info (tuple),
etc... }

'<device>' is a string with the device name, ie. 'eth0'

Device Information:
( <static ip (bool)>, <PRE ip address (string)>, <PRE netmask (string)>,
<PRE broadcast (string)>, <PRE gateway (string)>, <POST ip address
(string)>, <POST netmask (string)>, <POST broadcast (string)>, <POST
gateway (string)>, <load at boot (bool)>, <(POST) alias (tuple)> )

<static ip> is a bool to say whether or not the device uses a static ip
address.  False would default to DHCP.



What do you guys think?

Nathaniel

Attachments

File name MIME type
signature.asc application/pgp-signature