Changeset 1170
- Timestamp:
- Apr 11, 2016, 1:16:35 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zero-server-wizard/trunk/fuentes/install-files/usr/share/zero-server-wizard/types/slave/actions/065-nfs.py
r1040 r1170 18 18 return(False,"User validation error") 19 19 20 for item in ["srv_ip","adminpassword","enable_data_replication","mount_ nfs","export_nfs","nfs_ip"]:20 for item in ["srv_ip","adminpassword","enable_data_replication","mount_from_master","nfs_ip"]: 21 21 if item not in self.template: 22 22 print("\t[065-nfs] [!]" + item + " is missing from template. Aborting initialization") … … 28 28 29 29 ret=check_variables() 30 31 # Cleaning process just in case this is a reinitalization 32 33 print c.clean_exports_file(user,"NfsManager") 34 print c.remove_mount_on_boot(user,"NfsManager","/net/server-sync") 35 36 30 37 if self.template["enable_data_replication"].lower() == "true": 31 38 if ret[0]: … … 38 45 else: 39 46 user=self.template["masterkey"] 47 48 49 if not "remote_user" in self.template: 50 self.template["remote_user"]="netadmin" 51 self.template["remote_password"]=self.template["adminpassword"] 52 53 54 remote_user=(self.template["remote_user"],self.template["remote_password"]) 55 40 56 41 if self.template["export_nfs"]=="true": 42 pass 57 if self.template["mount_from_master"]=="true": 58 r=xmlrpclib.ServerProxy("https://10.3.0.254:9779") 59 number_classroom = self.template["number_classroom"] 60 ip='10.3.0.' + str(int(number_classroom)) 61 share="10.3.0.254:/net/server-sync" 62 print r.add_share(remote_user,"NfsManager","/net/server-sync",ip) 63 print c.configure_mount_on_boot(user,"NfsManager",share,"/net/server-sync") 64 if self.template["mount_nfs"]=="true": 65 print c.configure_mount_on_boot(user,"NfsManager",self.template["nfs_ip"],"/net/server-sync") 43 66 44 45 if self.template["mount_nfs"]=="true":46 #self.tempalte["nfs_ip"]47 pass48 67 except Exception as e: 49 68 print e
Note: See TracChangeset
for help on using the changeset viewer.