Lines Matching refs:self

75     def __init__(self, location, tmpdir):  argument
76 self.location = location
77 self.tmpdir = tmpdir
78 self.srcdir = location
80 def prepare(self): argument
81 if not os.path.exists(self.tmpdir):
82 os.makedirs(self.tmpdir, 0750)
84 def cleanup(self): argument
87 def get_file(self, filename): argument
88 url = os.path.join(self.srcdir, filename)
90 … local_name = os.path.join(self.tmpdir, 'xenpvboot.%s.%s' % (os.path.basename(filename), suffix))
98 def prepare(self): argument
99 Fetcher.prepare(self)
100 self.srcdir = tempfile.mkdtemp(prefix='xenpvboot.', dir=self.tmpdir)
101 if self.location.startswith('nfs:'):
102 mount(self.location[4:], self.srcdir, '-o ro')
104 if stat.S_ISBLK(os.stat(self.location)[stat.ST_MODE]):
110 mount(self.location, self.srcdir, option)
112 def cleanup(self): argument
113 umount(self.srcdir)
115 os.rmdir(self.srcdir)
121 def __init__(self, location, tmpdir): argument
122 self.nfsdir = None
123 MountedFetcher.__init__(self, location, tmpdir)
125 def prepare(self): argument
126 Fetcher.prepare(self)
127 self.nfsdir = tempfile.mkdtemp(prefix='xenpvboot.', dir=self.tmpdir)
128 self.srcdir = tempfile.mkdtemp(prefix='xenpvboot.', dir=self.tmpdir)
129 nfs = os.path.dirname(self.location[8:])
130 iso = os.path.basename(self.location[8:])
131 mount(nfs, self.nfsdir, '-o ro')
135 mount(os.path.join(self.nfsdir, iso), self.srcdir, option)
137 def cleanup(self): argument
138 MountedFetcher.cleanup(self)
140 umount(self.nfsdir)
142 os.rmdir(self.nfsdir)
148 def get_file(self, filename): argument
149 if '/' in self.location[7:]:
150 host = self.location[7:].split('/', 1)[0].replace(':', ' ')
151 basedir = self.location[7:].split('/', 1)[1]
153 host = self.location[7:].replace(':', ' ')
156 … local_name = os.path.join(self.tmpdir, 'xenpvboot.%s.%s' % (os.path.basename(filename), suffix))