Settings YAML changes to add settings validation.

Change-Id: Ied5f585eb6165daccfb606f403f55af9a26f56c3
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
diff --git a/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml b/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml
index 183932c..ffcb78e 100644
--- a/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml
+++ b/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings-defaults/defaults.yaml
@@ -1,49 +1,75 @@
 /xyz/openbmc_project/control/host0/auto_reboot:
     Interface: xyz.openbmc_project.Control.Boot.RebootPolicy
-    Defaults:
-        AutoReboot: 'false'
+    Properties:
+        AutoReboot:
+           Default: 'false'
 
 /xyz/openbmc_project/control/host0/boot_source:
     Interface: xyz.openbmc_project.Control.Boot.Source
-    Defaults:
-        BootSource: Source::Sources::Default
+    Properties:
+        BootSource:
+            Default: Source::Sources::Default
 
 /xyz/openbmc_project/control/host0/boot_mode:
     Interface: xyz.openbmc_project.Control.Boot.Mode
-    Defaults:
-        BootMode: Mode::Modes::Regular
+    Properties:
+        BootMode:
+            Default: Mode::Modes::Regular
 
 /xyz/openbmc_project/control/host0/power_cap:
     Interface: xyz.openbmc_project.Control.Power.Cap
-    Defaults:
-        PowerCap: 0
-        PowerCapEnable: 'false'
+    Properties:
+        PowerCap:
+            Default: 0
+            Validation:
+                Type: "range"
+                Validator: "0..1000"
+                Unit: "Watts"
+        PowerCapEnable:
+             Default: 'false'
 
 /xyz/openbmc_project/control/host0/power_restore_policy:
     Interface: xyz.openbmc_project.Control.Power.RestorePolicy
-    Defaults:
-        PowerRestorePolicy: RestorePolicy::Policy::Restore
+    Properties:
+        PowerRestorePolicy:
+            Default: RestorePolicy::Policy::Restore
 
 /xyz/openbmc_project/time/owner:
     Interface: xyz.openbmc_project.Time.Owner
-    Defaults:
-        TimeOwner: Owner::Owners::BMC
+    Properties:
+        TimeOwner:
+            Default: Owner::Owners::BMC
 
 /xyz/openbmc_project/time/sync_method:
     Interface: xyz.openbmc_project.Time.Synchronization
-    Defaults:
-        TimeSyncMethod: Synchronization::Method::NTP
+    Properties:
+        TimeSyncMethod:
+            Default: Synchronization::Method::NTP
 
 /xyz/openbmc_project/network/host0/intf:
     Interface: xyz.openbmc_project.Network.MACAddress
-    Defaults:
-        MACAddress: '"00:00:00:00:00:00"'
+    Properties:
+        MACAddress:
+            Default: '"00:00:00:00:00:00"'
+            Validation:
+                Type: "regex"
+                Validator: '^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$'
 
+#needs to implement address validation TODO openbmc/issues/2046
 /xyz/openbmc_project/network/host0/intf/addr:
     Interface: xyz.openbmc_project.Network.IP
-    Defaults:
-        Address: '"0.0.0.0"'
-        PrefixLength: 0
-        Origin: IP::AddressOrigin::Static
-        Gateway: '"0.0.0.0"'
-        Type: IP::Protocol::IPv4
+    Properties:
+        Address:
+            Default: '"0.0.0.0"'
+        PrefixLength:
+            Default: 0
+            Validation:
+                Type: "range"
+                Validator: 0..128
+                Unit: "bits"
+        Origin:
+            Default: IP::AddressOrigin::Static
+        Gateway:
+            Default: '"0.0.0.0"'
+        Type:
+            Default: IP::Protocol::IPv4
diff --git a/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings-manager.inc b/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings-manager.inc
index ed284c1..3a7733a 100644
--- a/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings-manager.inc
+++ b/meta-phosphor/common/recipes-phosphor/settings/phosphor-settings-manager.inc
@@ -2,4 +2,4 @@
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
 SRC_URI += "git://github.com/openbmc/phosphor-settingsd"
-SRCREV = "c15990a32063192e51c0c3ef5e65e149b2c44d70"
+SRCREV = "61d3b6a1f283f0926cb3e92e14378175030da1b2"