diff --git a/cloudinit/config/cc_zypper_add_repo.py b/cloudinit/config/cc_zypper_add_repo.py
index f1be13d..590339e 100644
--- a/cloudinit/config/cc_zypper_add_repo.py
+++ b/cloudinit/config/cc_zypper_add_repo.py
@@ -10,6 +10,7 @@ import os
import configobj
import six
+from cloudinit.settings import PER_ALWAYS
from cloudinit import log as logging
from cloudinit import util
from cloudinit.config.schema import (
@@ -54,6 +55,42 @@ schema = {
""")],
'frequency': PER_ALWAYS,
'type': 'object',
+ "properties": {
+ "zypper": {
+ "type": "object",
+ 'properties': {
+ 'repos': {
+ 'type': 'array',
+ 'items': {
+ 'type': 'object',
+ 'properties': {
+ 'id': {
+ 'type': 'string',
+ 'description': dedent("""\
+ The unique id of the repo, used when writing
+ /etc/zypp/repos.d/<id>.repo.""")
+ },
+ 'baseurl': {
+ 'type': 'string',
+ 'format': 'uri', # built-in format type
+ 'description': 'The base repositoy URL'
+ }
+ },
+ 'required': ['id', 'baseurl'],
+ 'additionalProperties': True
+ },
+ 'minItems': 1
+ },
+ 'config': {
+ 'type': 'object',
+ 'description': 'Any supported zypo.conf key is written to /etc/zypp/zypp.conf'
+ }
+ },
+ 'required': [],
+ 'minProperties': 1, # Either config or repo must be provided
+ 'additionalProperties': False, # only repos and config allowed
+ }
+ }
}
__doc__ = get_schema_doc(schema) # Supplement python help()