self.branch = branch
self.commit = commit
+ def validate(self) -> None:
+ """Validate parameters before writing any state to disk."""
+ pass
+
def add_repo(self) -> None:
raise NotImplementedError
return '%s/rpm-%s/%s' % (self.ctx.repo_url, self.stable,
self.distro_code)
- def add_repo(self) -> None:
+ def validate(self) -> None:
if self.distro_code.startswith('fc'):
raise Error('Ceph team does not build Fedora specific packages and therefore cannot add repos for this distro')
if self.distro_code == 'el7':
raise Error('Ceph does not support pacific or later for this version of this linux distro and therefore cannot add a repo for it')
if self.version and self.version.split('.')[0] >= '16':
raise Error('Ceph does not support 16.y.z or later for this version of this linux distro and therefore cannot add a repo for it')
+
+ def add_repo(self) -> None:
if self.stable or self.version:
content = ''
for n, t in {
version=ctx.version,
branch=ctx.dev,
commit=ctx.dev_commit)
+ pkg.validate()
pkg.add_repo()
logger.info('Completed adding repo.')