From 8d656133b3f1e8699f4900e747c1db6d68c98646 Mon Sep 17 00:00:00 2001 From: Nagaraju Goruganti Date: Wed, 17 Oct 2018 03:08:21 -0500 Subject: 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 Signed-off-by: Deepak Kodihalli --- xyz/openbmc_project/Common.errors.yaml | 2 ++ xyz/openbmc_project/Common.metadata.yaml | 2 ++ xyz/openbmc_project/User/Ldap/Config.interface.yaml | 1 + xyz/openbmc_project/User/Ldap/Create.interface.yaml | 1 + 4 files changed, 6 insertions(+) (limited to 'xyz') 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 @@ properties: 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 @@ methods: errors: - xyz.openbmc_project.Common.Error.InternalFailure - xyz.openbmc_project.Common.Error.InvalidArgument + - xyz.openbmc_project.Common.Error.NoCACertificate enumerations: - name: SearchScope -- cgit v1.2.1