mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-02 05:43:02 +02:00
yanger: Allow manufactering date to be day 1-9
When the day of month is 1-9 the format did not match the yang model
This commit is contained in:
committed by
Joachim Wiberg
parent
c72bc34df1
commit
320410b950
+1
-1
@@ -160,7 +160,7 @@ def get_vpd_data(vpd):
|
||||
if vpd.get("data"):
|
||||
component["class"] = "infix-hardware:vpd"
|
||||
if vpd["data"].get("manufacture-date"):
|
||||
component["mfg-date"]=datetime.strptime(vpd["data"]["manufacture-date"],"%m/%d/%Y %H:%M:%S").strftime("%Y-%m-%-dT%H:%M:%SZ")
|
||||
component["mfg-date"]=datetime.strptime(vpd["data"]["manufacture-date"],"%m/%d/%Y %H:%M:%S").strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||
if vpd["data"].get("manufacter"):
|
||||
component["mfg-name"]=vpd["data"]["manufacturer"]
|
||||
if vpd["data"].get("product-name"):
|
||||
|
||||
Reference in New Issue
Block a user