bye bye secrets.py
On vire les dernières références à secrets.py via import direct de /etc/crans/secrets/secrets.py Ci-dessous une liste des trucs modifié et les raisons ./gestion/iscsi/nolslib.py:execfile("/etc/crans/secrets/nols.py") ./gestion/iscsi/slonlib.py:execfile("/etc/crans/secrets/slon.py") ./gestion/gen_confs/trigger.py:_args = ["ssh", "-4", "-i", "/etc/crans/secrets/trigger-generate" ] ./gestion/gen_confs/dhcpd_new.py: sys.path.append('/usr/scripts/gestion/secrets') ./gestion/gen_confs/dhcpd_new.py: from secrets import dhcp_omapi_keyname,dhcp_omapi_keys ./gestion/gen_confs/populate_sshFingerprint.py:sys.path.append('/etc/crans/secrets/') ./sip/sms_queuing:sys.path.insert(0, '/usr/scripts/gestion/secrets') ./sip/sms_queuing:from secrets import asterisk_sms_passwd ./sip/sip_multidial.py:sys.path.append('/etc/crans/secrets/') ./sip/sip_multidial.py:import secrets ./gestion/gen_confs/switchs.py: sys.path.append('/usr/scripts/gestion/secrets') ./gestion/gen_confs/switchs.py: from secrets import radius_key ./gestion/set_droits.sh: if [[ $1 = "$BASE/secrets" ]] ; then ./gestion/set_droits.sh: elif [[ $1 = "$BASE/secrets/secrets.py" ]] || [[ $1 = "$BASE/secrets/secrets.pyc" ]]; then ./admin/confmail/conf_mail.py:sys.path.append('/usr/scripts/gestion/secrets') ./admin/confmail/conf_mail.py:from secrets import secretConfirmMail
This commit is contained in:
parent
77e0b1daad
commit
92275f8948
11 changed files with 24 additions and 896 deletions
|
@ -1,4 +1,3 @@
|
|||
#! /usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
""" Génération de la configuration pour le dhcp
|
||||
|
@ -7,24 +6,28 @@ Copyright (C) Frédéric Pauget
|
|||
Licence : GPLv2
|
||||
"""
|
||||
import os
|
||||
from iptools import AddrInNet
|
||||
from gen_confs import gen_config
|
||||
import sys
|
||||
from socket import gethostname
|
||||
from config import NETs
|
||||
import struct
|
||||
|
||||
if '/usr/scripts' not in sys.path:
|
||||
sys.path.append('/usr/scripts')
|
||||
|
||||
from gestion.iptools import AddrInNet
|
||||
from gestion.gen_confs import gen_config
|
||||
from gestion.config import NETs
|
||||
from gestion import secrets_new as secrets
|
||||
|
||||
# Relative imports
|
||||
from pypureomapi import pack_ip, pack_mac, OMAPI_OP_UPDATE
|
||||
from pypureomapi import Omapi, OmapiMessage, OmapiError, OmapiErrorNotFound
|
||||
import struct
|
||||
|
||||
hostname = gethostname().split(".")[0]
|
||||
|
||||
class dydhcp:
|
||||
def __init__(self, server):
|
||||
import sys
|
||||
sys.path.append('/usr/scripts/gestion/secrets')
|
||||
from secrets import dhcp_omapi_keyname,dhcp_omapi_keys
|
||||
self.dhcp_omapi_keyname = dhcp_omapi_keyname
|
||||
self.dhcp_omapi_key = dhcp_omapi_keys[server]
|
||||
self.dhcp_omapi_keyname = secrets.get('dhcp_omapi_keyname')
|
||||
self.dhcp_omapi_key = secrets.get('dhcp_omapi_keys')[server]
|
||||
self.server = server.lower()
|
||||
|
||||
def add_host(self, ip, mac,name=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue