vim_account_new_schema, vim_account_edit_schema, sdn_new_schema, sdn_edit_schema, \
wim_account_new_schema, wim_account_edit_schema, roles_new_schema, roles_edit_schema, \
k8scluster_new_schema, k8scluster_edit_schema, k8srepo_new_schema, k8srepo_edit_schema, \
- validate_input, ValidationError, is_valid_uuid # To check that User/Project Names don't look like UUIDs
+ osmrepo_new_schema, osmrepo_edit_schema, \
+ validate_input, ValidationError, is_valid_uuid # To check that User/Project Names don't look like UUIDs
from osm_nbi.base_topic import BaseTopic, EngineException
from osm_nbi.authconn import AuthconnNotFoundException, AuthconnConflictException
from osm_common.dbbase import deep_update_rfc7396
return oid
+class OsmRepoTopic(BaseTopic):
+ topic = "osmrepos"
+ topic_msg = "osmrepos"
+ schema_new = osmrepo_new_schema
+ schema_edit = osmrepo_edit_schema
+ multiproject = True
+ # TODO: Implement user/password
+
+
class UserTopicAuth(UserTopic):
# topic = "users"
# topic_msg = "users"
from osm_nbi.authconn_internal import AuthconnInternal
from osm_nbi.base_topic import EngineException, versiontuple
from osm_nbi.admin_topics import VimAccountTopic, WimAccountTopic, SdnTopic
-from osm_nbi.admin_topics import K8sClusterTopic, K8sRepoTopic
+from osm_nbi.admin_topics import K8sClusterTopic, K8sRepoTopic, OsmRepoTopic
from osm_nbi.admin_topics import UserTopicAuth, ProjectTopicAuth, RoleTopicAuth
from osm_nbi.descriptor_topics import VnfdTopic, NsdTopic, PduTopic, NstTopic, VnfPkgOpTopic
from osm_nbi.instance_topics import NsrTopic, VnfrTopic, NsLcmOpTopic, NsiTopic, NsiLcmOpTopic
"sdns": SdnTopic,
"k8sclusters": K8sClusterTopic,
"k8srepos": K8sRepoTopic,
+ "osmrepos": OsmRepoTopic,
"users": UserTopicAuth, # Valid for both internal and keystone authentication backends
"projects": ProjectTopicAuth, # Valid for both internal and keystone authentication backends
"roles": RoleTopicAuth, # Valid for both internal and keystone authentication backends
/<id> O O O
/k8srepos O O
/<id> O O
+ /osmrepos O O
+ /<id> O O
/nst/v1 O O
/netslice_templates_content O O
"ROLE_PERMISSION": "k8srepos:id:"
}
},
+ "osmrepos": {"METHODS": ("GET", "POST"),
+ "ROLE_PERMISSION": "osmrepos:",
+ "<ID>": {"METHODS": ("GET", "DELETE", "PATCH"),
+ "ROLE_PERMISSION": "osmrepos:id:"
+ }
+ },
"domains": {"METHODS": ("GET", ),
"ROLE_PERMISSION": "domains:",
},
"additionalProperties": False
}
+# OSM Repos
+osmrepo_types = {"enum": ["osm"]}
+osmrepo_properties = {
+ "name": name_schema,
+ "description": description_schema,
+ "type": osmrepo_types,
+ "url": description_schema
+ # "user": shortname_schema,
+ # "password": passwd_schema
+}
+osmrepo_new_schema = {
+ "title": "osm repo creation input schema",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": osmrepo_properties,
+ "required": ["name", "type", "url"],
+ "additionalProperties": False
+}
+osmrepo_edit_schema = {
+ "title": "osm repo edit input schema",
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": osmrepo_properties,
+ "additionalProperties": False
+}
+
# PDUs
pdu_interface = {
"type": "object",