[iscsi] Un truc un peu plus générique que le commit précédent...
Ignore-this: 1a03894b0e7eee239fe5a3b415594cc6 darcs-hash:20120807230017-108b1-719379098a34feeda0126b5b5317c56386077434.gz
This commit is contained in:
parent
af9c060e1c
commit
31e08c85be
8 changed files with 36 additions and 79 deletions
|
@ -13,9 +13,11 @@ stockage'''
|
|||
import nolslib, re, sys
|
||||
|
||||
sys.path.append("/usr/scripts/gestion")
|
||||
from config import ISCSI_NEW_MAP_FILE
|
||||
from config import ISCSI_MAP_FILE_TEMPLATE
|
||||
import affich_tools
|
||||
|
||||
map_file = ISCSI_MAP_FILE_TEMPLATE % "nols"
|
||||
|
||||
print u"Connexion à la baie de stockage..."
|
||||
|
||||
nols = nolslib.Nols()
|
||||
|
@ -31,7 +33,7 @@ nols.logout()
|
|||
|
||||
print u"Enregistrement des informations..."
|
||||
|
||||
f = open(ISCSI_NEW_MAP_FILE, "w")
|
||||
f = open(map_file, "w")
|
||||
f.write((u"""\
|
||||
# -*- coding: utf-8 -*-
|
||||
# Fichier de mapping lun -> nom de volume
|
||||
|
@ -48,7 +50,7 @@ f.write("}\n")
|
|||
|
||||
f.close()
|
||||
|
||||
print u"Terminé, mapping enregistré dans %s" % ISCSI_NEW_MAP_FILE
|
||||
print u"Terminé, mapping enregistré dans %s" % map_file
|
||||
|
||||
print u"Le mapping actuel est:"
|
||||
print affich_tools.tableau(titre = ["lun", "nom"], data = map, alignement = ["g", "c"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue