Commit 942cc07c authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Prefix the NIC_* variables with SNF_IMAGE_

Make them comply with the rest of the variable names
parent de126475
......@@ -224,65 +224,59 @@ required information in its enviroment. In the table below we describe the
enviroment variables that are present when the configuration tasks run.
+-------------------------------+---------------------------------------------+
|Name |Details |
+===============================+=============================================+
|SNF_IMAGE_DEV_COUNT |The number of the instance's disks |
+-------------------------------+---------------------------------------------+
|SNF_IMAGE_DEV_%N |The device file of the Nth disk |
+-------------------------------+---------------------------------------------+
|SNF_IMAGE_DEV |The device file of the first disk (we keep |
| |this for backward compatibility) |
+-------------------------------+---------------------------------------------+
|SNF_IMAGE_PERSONALITY |The value of the img_personality OS |
| |parameter |
+-------------------------------+---------------------------------------------+
|SNF_IMAGE_HOSTNAME |The instance's name |
+-------------------------------+---------------------------------------------+
|SNF_IMAGE_PASSWD |The value of the img_passwd OS parameter. |
+-------------------------------+---------------------------------------------+
|SNF_IMAGE_PASSWD_HASH |The value of the img_passwd_hash OS |
| |parameter. |
+-------------------------------+---------------------------------------------+
|SNF_IMAGE_PROPERTY_* |The value of a specific image property |
| |that was specified in json through the |
| |img_properties OS parameter. |
+-------------------------------+---------------------------------------------+
|SNF_IMAGE_RESIZE_PART |The number of the partition that will be |
| |enlarged. |
+-------------------------------+---------------------------------------------+
|SNF_IMAGE_TARGET |The directory the instance's file systems are|
| |mounted under. |
+-------------------------------+---------------------------------------------+
|NIC_COUNT |The number of the instance's network |
| |interfaces |
+-------------------------------+---------------------------------------------+
|NIC_%N_* |The ganeti provided environment variable |
| |for the Nth network interface. Check `here <h|
| |ttp://docs.ganeti.org/ganeti/current/man/gane|
| |ti-os-interface.html>`_ |
+-------------------------------+---------------------------------------------+
|SNF_IMAGE_DHCP_TAGS |The value of the DHCP_TAGS configuration |
| |parameter (see |
| |:ref:`Configuration Parameters |
| |<configuration-parameters>`) |
+-------------------------------+---------------------------------------------+
|SNF_IMAGE_STATEFUL_DHCPV6_TAGS |The value of the STATEFUL_DHCPV6_TAGS |
| |configuration parameter (see |
| |:ref:`Configuration Parameters |
| |<configuration-parameters>`) |
+-------------------------------+---------------------------------------------+
|SNF_IMAGE_STATELESS_DHCPV6_TAGS|The value of the STATELESS_DHCPV6_TAGS |
| |configuration parameter (see |
| |:ref:`Configuration Parameters |
| |<configuration-parameters>`) |
+-------------------------------+---------------------------------------------+
|SNF_IMAGE_UNATTEND |The value of the UNATTED configuration |
| |parameter (see |
| |:ref:`Configuration Parameters |
| |<configuration-parameters>`) |
+-------------------------------+---------------------------------------------+
+---------------------+-------------------------------------------------------+
|Name [#]_ |Details |
+=====================+=======================================================+
|DEV_COUNT |The number of the instance's disks. |
+---------------------+-------------------------------------------------------+
|DEV_%N |The device file of the Nth disk. |
+---------------------+-------------------------------------------------------+
|DEV |The device file of the first disk (we keep this for |
| |backward compatibility) |
+---------------------+-------------------------------------------------------+
|PERSONALITY |The value of the img_personality OS parameter. |
+---------------------+-------------------------------------------------------+
|HOSTNAME |The instance's name. |
+---------------------+-------------------------------------------------------+
|PASSWD |The value of the img_passwd OS parameter. |
+---------------------+-------------------------------------------------------+
|PASSWD_HASH |The value of the img_passwd_hash OS parameter. |
+---------------------+-------------------------------------------------------+
|PROPERTY_* |The value of a specific image property that was |
| |specified in json through the img_properties OS |
| |parameter. |
+---------------------+-------------------------------------------------------+
|RESIZE_PART |The number of the partition that will be enlarged. |
+---------------------+-------------------------------------------------------+
|TARGET |The directory the instance's file systems are mounted |
| |under. |
+---------------------+-------------------------------------------------------+
|NIC_COUNT |The number of network interface controllers of the |
| |instance. |
+---------------------+-------------------------------------------------------+
|NIC_%N_* |The ganeti provided environment variable for the Nth |
| |network interface controller. Check |
| |`here <http://docs.ganeti.org/ganeti/current/man/ganeti|
| |-os-interface.html>`_ |
+---------------------+-------------------------------------------------------+
|DHCP_TAGS |The value of the DHCP_TAGS configuration parameter (see|
| |:ref:`Configuration Parameters |
| |<configuration-parameters>`) |
+---------------------+-------------------------------------------------------+
|STATEFUL_DHCPV6_TAGS |The value of the STATEFUL_DHCPV6_TAGS configuration |
| |parameter (see :ref:`Configuration Parameters |
| |<configuration-parameters>`) |
+---------------------+-------------------------------------------------------+
|STATELESS_DHCPV6_TAGS|The value of the STATELESS_DHCPV6_TAGS configuration |
| |parameter (see :ref:`Configuration Parameters |
| |<configuration-parameters>`) |
+---------------------+-------------------------------------------------------+
|UNATTEND |The value of the UNATTED configuration parameter (see |
| |:ref:`Configuration Parameters |
| |<configuration-parameters>`) |
+---------------------+-------------------------------------------------------+
.. [#] all environment variable names are prefixed with *SNF_IMAGE_*
.. rubric:: Footnotes
......
......@@ -224,7 +224,7 @@ only environment variable required is *SNF_IMAGE_TARGET*.
+-------------------------------+---+--------------------------------------------+----------------------------------------------+
| | | Dependencies | Enviromental Variables [#]_ |
| | | Dependencies | Environment Variables [#]_ |
+ Name | +------------------+-------------------------+-------------------------+--------------------+
| |Pr.| Run-After | Run-Before | Required | Optional |
+===============================+===+==================+=========================+=========================+====================+
......
......@@ -51,24 +51,24 @@ export SNF_IMAGE_TARGET
# Initialize the driver
"@networkingdir@/$distro.sh" -i
for index in $(seq 0 $((NIC_COUNT-1))); do
for index in $(seq 0 $((SNF_IMAGE_NIC_COUNT-1))); do
dhcp=no
dhcp6=no
ipv4=no
ipv6=no
eval export TYPE=\"\$NIC_${index}_FRONTEND_TYPE\"
eval export IP=\"\$NIC_${index}_IP\"
eval export LINK=\"\$NIC_${index}_LINK\"
eval export MAC=\"\$NIC_${index}_MAC\"
eval export MODE=\"\$NIC_${index}_MODE\"
eval export NAME=\"\$NIC_${index}_NAME\"
eval export GATEWAY=\"\$NIC_${index}_NETWORK_GATEWAY\"
eval export GATEWAY6=\"\$NIC_${index}_NETWORK_GATEWAY6\"
eval export NETWORK_NAME=\"\$NIC_${index}_NETWORK_NAME\"
eval export SUBNET=\"\$NIC_${index}_NETWORK_SUBNET\"
eval export SUBNET6=\"\$NIC_${index}_NETWORK_SUBNET6\"
eval export TAGS=\"\$NIC_${index}_NETWORK_TAGS\"
eval export TYPE=\"\$SNF_IMAGE_NIC_${index}_FRONTEND_TYPE\"
eval export IP=\"\$SNF_IMAGE_NIC_${index}_IP\"
eval export LINK=\"\$SNF_IMAGE_NIC_${index}_LINK\"
eval export MAC=\"\$SNF_IMAGE_NIC_${index}_MAC\"
eval export MODE=\"\$SNF_IMAGE_NIC_${index}_MODE\"
eval export NAME=\"\$SNF_IMAGE_NIC_${index}_NAME\"
eval export GATEWAY=\"\$SNF_IMAGE_NIC_${index}_NETWORK_GATEWAY\"
eval export GATEWAY6=\"\$SNF_IMAGE_NIC_${index}_NETWORK_GATEWAY6\"
eval export NETWORK_NAME=\"\$SNF_IMAGE_NIC_${index}_NETWORK_NAME\"
eval export SUBNET=\"\$SNF_IMAGE_NIC_${index}_NETWORK_SUBNET\"
eval export SUBNET6=\"\$SNF_IMAGE_NIC_${index}_NETWORK_SUBNET6\"
eval export TAGS=\"\$SNF_IMAGE_NIC_${index}_NETWORK_TAGS\"
# Relative to the card type index
: $((${TYPE}_index++))
......
......@@ -231,7 +231,7 @@ create_floppy() {
fi
fi
# Put all the NIC info in the floppy
set | egrep ^NIC_ | sed -e 's/^/export /' >> "$target/rules"
set | egrep ^NIC_ | sed -e 's/^/export SNF_IMAGE_/' >> "$target/rules"
umount "$target"
}
......
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