]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blobdiff - webapp/backend/releases.py
netboot: Allow booting multiple architectures
[people/shoehn/ipfire.org.git] / webapp / backend / releases.py
index 7184b229023863b4342237cd0462bbd105ab495d..48f7b5d25c7645a40a54dfb0037e67fb883c8b80 100644 (file)
@@ -365,17 +365,38 @@ class Release(Object):
                        if f:
                                f.close()
 
+       def supports_arch(self, arch):
+               # Currently there is nothing else than i586 supported
+               if arch == "i586":
+                       return True
+
+               return False
+
+       def supports_platform(self, platform):
+               # Currently there is nothing else than pcbios supported
+               if platform == "pcbios":
+                       return True
+
+               return False
+
        def is_netboot_capable(self):
                return self.path and "ipfire-2.x" in self.path
 
-       @property
-       def netboot_kernel(self):
+       def netboot_kernel_url(self, arch, platform):
+               assert self.supports_arch(arch)
+               assert self.supports_platform(platform)
+
                return "http://downloads.ipfire.org/%s/images/vmlinuz" % self.path
 
-       @property
-       def netboot_initrd(self):
+       def netboot_initrd_url(self, arch, platform):
+               assert self.supports_arch(arch)
+               assert self.supports_platform(platform)
+
                return "http://downloads.ipfire.org/%s/images/instroot" % self.path
 
+       def netboot_args(self, arch, platform):
+               return ""
+
        @property
        def news_id(self):
                return self.__data.news_id