--- /dev/null
+This directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins.
+
+This directory caches those eggs to prevent repeated downloads.
+
+However, it is safe to delete this directory.
+
return data
def generalInfo(self):
+ try:
+ osInfo = ["OS", self.data["os"]["value"]["distro"]["description"]]
+ except KeyError:
+ osInfo = ["OS", f'{self.data["os"]["value"]["name"]} {self.data["os"]["value"]["release"]["major"]}'] # Catching Solaris
+
data = [["Customer", self.data["customer"]["value"]],
["FQDN", self.data["fqdn"]["value"]],
- ["OS", self.data["os"]["value"]["distro"]["description"]],
+ osInfo,
["Purpose", self.data["pp_purpose"]["value"]],
["Tier", self.data["tier"]["value"]],
["R10k Env", self.data["r10k_environment"]["value"]]]
def partitionInfo(self):
partuuid = re.compile(r"^[\d\w]{8}\-[\d\w]{2}$")
self.simpleTabulate([[colored("Partitions:", "green")]], "orgtbl")
- self.complexTabulate(self.data["partitions"], additionalSpot={"size": 5, "location": 2},
+ try:
+ self.complexTabulate(self.data["partitions"], additionalSpot={"size": 5, "location": 2},
excludeHeader="partuuid", excludeValue=partuuid)
+ except KeyError:
+ print(colored(" [Warning] This host is probably Solaris, therefore partitions are not available in PuppetDB facts.", "red"))
+
def networkInfo(self):
data = [[interface, ','.join(ip)] for interface, ip in self.data["pp_ip_cidr"]["value"].items()]