trying to figure out hoe i group os's and stuff
[glcas.git] / plugins / knownos.php
diff --git a/plugins/knownos.php b/plugins/knownos.php
new file mode 100644 (file)
index 0000000..eda7b96
--- /dev/null
@@ -0,0 +1,58 @@
+<?php
+
+// this class will provide OS knowledge - though how i have no idea yet
+class GLCASKnownOS {
+       
+       function __construct()
+       {
+               $knownOS = getKnownOSList();
+       }
+       
+       function getOSList()
+       {
+       }
+       
+       function getRepoTypeForOS($os)
+       {
+               
+       }
+       
+       function getRepoTypes()
+       {
+               
+       }
+       
+       public $knownOS;
+}
+
+function getKnownOSList()
+{
+       // repo types
+       $kos["repotype"]["yum"] = "Yellowdog Updater Modified";
+       $kos["repotype"]["apt"] = "APT";
+
+       // repo providers
+       $kos["repotype"]["yum"][0] = "baseurl";
+       $kos["repotype"]["yum"][1] = "mirrorlist";
+       $kos["repotype"]["apt"][0] = "baseurl";
+       
+       // OS's
+       $kos["os"]["Fedora"] = "Fedora";
+       $kos["os"]["Debian"] = "Debian";
+       $kos["os"]["RedHat"] = "RedHat Enterprise Linux";
+       $kos["os"]["Ubuntu"] = "Ubuntu";
+       $kos["os"]["CentOS"] = "Community Enterprise OS";
+       
+       // Repo types per os
+       $kos["os"]["Fedora"]["repotype"] = "yum";
+       $kos["os"]["Debian"]["repotype"] = "apt";
+       $kos["os"]["RedHat"]["repotype"] = "yum";
+       $kos["os"]["Ubuntu"]["repotype"] = "apt";
+       $kos["os"]["CentOS"]["repotype"] = "yum";
+       
+       
+       
+       return $kos;
+}
+
+?>
\ No newline at end of file