Skip to content

Commit

Permalink
Merge pull request #24 from priyama2/ftpSupport1
Browse files Browse the repository at this point in the history
FTP Install Protocol Support:
  • Loading branch information
PraveenPenguin authored Oct 21, 2024
2 parents adaade2 + 3062a65 commit 62ac867
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions installvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ def createKickstart(self):
for disk in disks:
host_disk += '/dev/disk/by-id/' + disk+','
vmParser.args.host_disk = host_disk.rstrip(',')

if vmParser.args.install_protocol == 'http':
if version.startswith('8') or version.startswith('9') or version.startswith('10'):
lstr = "%end"
Expand All @@ -340,6 +341,15 @@ def createKickstart(self):
urlstring = "--url=http://"+vmParser.confparser('repo', 'RepoIP') + ':' + vmParser.confparser('repo', 'RepoPort') + \
self.repoDir

if vmParser.args.install_protocol == 'ftp':
#username:password@server/
if version.startswith('8') or version.startswith('9') or version.startswith('10'):
lstr = "%end"
urlstring = "--url=ftp://"+vmParser.confparser('repo', 'RepoIP') + ':' + self.repoDir + "/BaseOS"
else:
lstr = "telnet\njava\n%end"
urlstring = "--url=ftp://"+vmParser.confparser('repo', 'RepoIP') + ':' + self.repoDir

if vmParser.args.install_protocol == 'nfs':
if version.startswith('8') or version.startswith('9') or version.startswith('10'):
lstr = "%end"
Expand All @@ -357,6 +367,10 @@ def createKickstart(self):
logging.info("Aborting Installation : as filesystem type %s is not supported or not valid" % vmParser.args.fs_type)
exit_nosupport=1

if vmParser.args.install_protocol not in ['http','nfs','ftp']:
logging.info("Aborting Installation : as install protocol type %s is not supported or not valid" % vmParser.args.install_protocol)
exit_nosupport=1

if exit_nosupport:
exit(1)

Expand Down

0 comments on commit 62ac867

Please sign in to comment.