Fix OemAccountService schema

This schema as-written broke a bunch of Redfish specification rules for
schemas, naming and other things.  This commit starts to fix them.

It can be used as a starting point for fixing the existing schemas.
This working through testing.

Tested: OpenBMCAccountService_v1.xml now passes the redfish odata schema
validator.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Id991794344b8b7d36af3c44bba7214bf025deec8
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index f24fef5..9a931ad 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -1311,7 +1311,7 @@
     json["Accounts"]["@odata.id"] = "/redfish/v1/AccountService/Accounts";
     json["Roles"]["@odata.id"] = "/redfish/v1/AccountService/Roles";
     json["Oem"]["OpenBMC"]["@odata.type"] =
-        "#OemAccountService.v1_0_0.AccountService";
+        "#OpenBMCAccountService.v1_0_0.AccountService";
     json["Oem"]["OpenBMC"]["@odata.id"] =
         "/redfish/v1/AccountService#/Oem/OpenBMC";
     json["Oem"]["OpenBMC"]["AuthMethods"]["BasicAuth"] =
diff --git a/scripts/update_schemas.py b/scripts/update_schemas.py
index edc583a..7d6e768 100755
--- a/scripts/update_schemas.py
+++ b/scripts/update_schemas.py
@@ -194,12 +194,12 @@
 
 
 # Remove the old files
-skip_prefixes = "Oem"
+skip_prefixes = ["Oem", "OpenBMC"]
 if os.path.exists(schema_path):
     files = [
         os.path.join(schema_path, f)
         for f in os.listdir(schema_path)
-        if not f.startswith(skip_prefixes)
+        if not any([f.startswith(prefix) for prefix in skip_prefixes])
     ]
     for f in files:
         os.remove(f)
@@ -207,7 +207,7 @@
     files = [
         os.path.join(json_schema_path, f)
         for f in os.listdir(json_schema_path)
-        if not f.startswith(skip_prefixes)
+        if not any([f.startswith(prefix) for prefix in skip_prefixes])
     ]
     for f in files:
         if os.path.isfile(f):
@@ -392,7 +392,7 @@
     files = [
         os.path.join(schema_path, f)
         for f in os.listdir(schema_path)
-        if not f.startswith(skip_prefixes)
+        if not any([f.startswith(prefix) for prefix in skip_prefixes])
     ]
     for filename in files:
         # filename will include the absolute path
diff --git a/static/redfish/v1/schema/OemAccountService_v1.xml b/static/redfish/v1/schema/OpenBMCAccountService_v1.xml
similarity index 82%
rename from static/redfish/v1/schema/OemAccountService_v1.xml
rename to static/redfish/v1/schema/OpenBMCAccountService_v1.xml
index 7d58b2b..66b00bb 100644
--- a/static/redfish/v1/schema/OemAccountService_v1.xml
+++ b/static/redfish/v1/schema/OpenBMCAccountService_v1.xml
@@ -17,15 +17,30 @@
 
   <edmx:DataServices>
 
-    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="OemAccountService">
+    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="OpenBMCAccountService">
       <Annotation Term="Redfish.OwningEntity" String="OpenBMC"/>
+      <Annotation Term="OData.Description" String="OpenBMC extensions to the standard account service."/>
+      <Annotation Term="Redfish.Uris">
+        <Collection>
+          <String>/redfish/v1/AccountService#/OpenBMCAccountService</String>
+        </Collection>
+      </Annotation>
     </Schema>
 
-    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="OemAccountService.v1_0_0">
+    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="OpenBMCAccountService.v1_0_0">
       <Annotation Term="Redfish.OwningEntity" String="OpenBMC"/>
-      <Annotation Term="Redfish.Release" String="1.0"/>
 
-      <ComplexType Name="AuthMethodsConfig" BaseType="Resource.OemObject">
+      <ComplexType Name="AccountService" BaseType="Resource.OemObject">
+        <Annotation Term="OData.Description" String="OpenBMC OEM Extension for AccountService."/>
+        <Annotation Term="OData.LongDescription" String="OpenBMC OEM Extension for AccountService providing info about authentication methods."/>
+
+        <Property Name="AuthMethods" Type="OpenBMCAccountService.v1_0_0.AuthMethodsConfig">
+          <Annotation Term="OData.Description" String="Authorization Methods configuration."/>
+          <Annotation Term="OData.LongDescription" String="Configuration describing which auth methods are enabled."/>
+        </Property>
+      </ComplexType>
+
+      <ComplexType Name="AuthMethodsConfig">
         <Annotation Term="OData.AdditionalProperties" Bool="false"/>
         <Annotation Term="OData.Description" String="Authorization Methods configuration."/>
         <Annotation Term="OData.LongDescription" String="Configuration describing which auth methods are enabled."/>
@@ -61,17 +76,8 @@
         </Property>
       </ComplexType>
 
-      <!--Base entity type for array members-->
-      <EntityType Name="AccountService" BaseType="Resource.OemObject" Abstract="true">
-        <Annotation Term="OData.Description" String="OEM Extension for AccountService"/>
-        <Annotation Term="OData.LongDescription" String="OEM Extension for AccountService providing info about TLS Auth."/>
-
-        <Property Name="AuthMethods" Type="OemAccountService.v1_0_0.AuthMethodsConfig">
-          <Annotation Term="OData.Description" String="Authorization Methods configuration."/>
-          <Annotation Term="OData.LongDescription" String="Configuration describing which auth methods are enabled."/>
-        </Property>
-      </EntityType>
     </Schema>
 
   </edmx:DataServices>
 </edmx:Edmx>
+