Skip to content

Commit

Permalink
Merge pull request #72 from packethost/renovate/ubuntu-24.x
Browse files Browse the repository at this point in the history
chore(deps): update ubuntu docker tag to v24
  • Loading branch information
ofaurax authored Nov 5, 2024
2 parents c3363b0 + 37b7bb9 commit 9ddf260
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8

Expand Down Expand Up @@ -71,9 +71,8 @@ RUN apt-get update && apt-get install -y alien && \
COPY ./ /opt/packet-hardware/
# Install packet-hardware
RUN apt update && \
apt install -y git python3 && \
curl https://bootstrap.pypa.io/pip/3.5/get-pip.py | python3 && \
pip3 install --no-cache-dir /opt/packet-hardware && \
apt install -y git python3 python3-pip && \
pip3 install --no-cache-dir --break-system-packages /opt/packet-hardware && \
apt clean -qy && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /opt/packet-hardware
Expand Down
10 changes: 10 additions & 0 deletions packethardware/component/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ def __init__(self, lsblk):
),
"tool": self.lsblk["tool"],
}
self.lsblk["rota"] = self.data["rota"]
self.lsblk["size"] = self.data["size"]
if "children" in self.lsblk:
for c in self.lsblk["children"]:
c["rota"] = (
c["rota"]
if isinstance(c["rota"], str)
else "1" if c["rota"] else "0"
)
c["size"] = str(c["size"])

if self.__is_nvme():
self.data["smart"] = utils.get_nvme_attributes(self.lsblk["name"])
Expand Down

0 comments on commit 9ddf260

Please sign in to comment.