Declare errors in Config and Create interfaces

The Config interface and Create interface can throw a
"NoCACertificate" error.

For example: If LDAP server's CA certificate not provided and
someone tries to enable secure LDAP, this error should be thrown.

Change-Id: Ie773245fb7c6b36f25cd1acca2bfc3b0391dfeac
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/xyz/openbmc_project/Common.errors.yaml b/xyz/openbmc_project/Common.errors.yaml
index fe0e531..e5d8421 100644
--- a/xyz/openbmc_project/Common.errors.yaml
+++ b/xyz/openbmc_project/Common.errors.yaml
@@ -8,3 +8,5 @@
   description: Insufficient permission to perform operation
 - name: NotAllowed
   description: The operation is not allowed
+- name: NoCACertificate
+  description: Server's CA certificate has not been provided.
diff --git a/xyz/openbmc_project/Common.metadata.yaml b/xyz/openbmc_project/Common.metadata.yaml
index 83a923c..36b407c 100644
--- a/xyz/openbmc_project/Common.metadata.yaml
+++ b/xyz/openbmc_project/Common.metadata.yaml
@@ -17,3 +17,5 @@
   meta:
     - str: "REASON=%s"
       type: string
+- name: NoCACertificate
+  level: ERR
diff --git a/xyz/openbmc_project/User/Ldap/Config.interface.yaml b/xyz/openbmc_project/User/Ldap/Config.interface.yaml
index d644eef..387a36f 100644
--- a/xyz/openbmc_project/User/Ldap/Config.interface.yaml
+++ b/xyz/openbmc_project/User/Ldap/Config.interface.yaml
@@ -9,6 +9,7 @@
       default: false
       errors:
         - xyz.openbmc_project.Common.Error.InternalFailure
+        - xyz.openbmc_project.Common.Error.NoCACertificate
     - name: LDAPServerURI
       type: string
       description: >
diff --git a/xyz/openbmc_project/User/Ldap/Create.interface.yaml b/xyz/openbmc_project/User/Ldap/Create.interface.yaml
index 24f5d28..3255fba 100644
--- a/xyz/openbmc_project/User/Ldap/Create.interface.yaml
+++ b/xyz/openbmc_project/User/Ldap/Create.interface.yaml
@@ -52,6 +52,7 @@
       errors:
         - xyz.openbmc_project.Common.Error.InternalFailure
         - xyz.openbmc_project.Common.Error.InvalidArgument
+        - xyz.openbmc_project.Common.Error.NoCACertificate
 
 enumerations:
     - name: SearchScope