You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calculate-utils-3-install/install/variables/net.py

108 lines
3.0 KiB

#-*- coding: utf-8 -*-
# Copyright 2008-2012 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
from os import path
from calculate.lib.cl_datavars import Variables
from calculate.lib.variables import Net
from calculate.lib.cl_lang import setLocalTranslate
setLocalTranslate('cl_install',sys.modules[__name__])
class InstallNet(Net):
vars = ["os_net_interfaces_info","os_install_net_hash",
"os_install_net_hostname","os_install_net_allow",
"os_install_net_interfaces","os_install_net_name",
"os_install_net_mac","os_install_net_ip","os_install_net_network",
"os_install_net_cidr","os_install_net_route_hash",
"os_install_net_route_network","os_install_net_route_gw",
"os_install_net_route_dev","os_install_net_route_src",
"os_install_net_route","os_install_net_nmroute",
"os_install_net_dns","os_install_net_conf",
"os_install_net_settings","os_install_net_dhcp_set",
"os_install_net_dns_search","os_install_net_domain"]
# inforamation about net interfaces
os_net_interfaces_info = {}
# hash for information about net
os_install_net_hash = {}
# computer hostname
os_install_net_hostname = {'mode':"w"}
# allowed network
os_install_net_allow ={}
# net interfaces
os_install_net_interfaces={}
# net device name
os_install_net_name={}
# net devices mac
os_install_net_mac={}
# ip for all network interfaces
os_install_net_ip = {}
# network for ip
os_install_net_network = {}
# ip cidr
os_install_net_cidr = {}
# routing
os_install_net_route_hash = {}
# net for route
os_install_net_route_network = {}
# gw for route
os_install_net_route_gw = {}
# dev for route
os_install_net_route_dev = {}
# src for route
os_install_net_route_src = {}
# data by route for conf.d/net
os_install_net_route = {'hide':True}
# data by route for NetworkManager
os_install_net_nmroute = {'hide':True}
# dns servers
os_install_net_dns = {}
# net setup (networkmanager or openrc)
os_install_net_conf = {}
# net service configured
os_install_net_settings = {'mode':'w',
'value':''}
# dhcp or not
os_install_net_dhcp_set = {}
# dns search
os_install_net_dns_search = {'mode':"w"}
# domain
os_install_net_domain = {'mode':"w"}