Service instantiation #31

Merged
rixx merged 37 commits from 24-service-instantiation into main 2025-04-04 10:57:29 +00:00
2 changed files with 6 additions and 0 deletions
Showing only changes of commit 4e44b283b1 - Show all commits

View file

@ -49,6 +49,7 @@ class Organization(ServalaModelMixin, models.Model):
base = "/org/{self.slug}/"
details = "{base}details/"
services = "{base}services/"
services = "{base}instances/"
@cached_property
def slug(self):

View file

@ -1,4 +1,5 @@
import kubernetes
import urlman
from django.core.cache import cache
from django.core.exceptions import ValidationError
from django.db import models
@ -452,3 +453,7 @@ class ServiceInstance(ServalaModelMixin, models.Model):
# Names are unique per de-facto namespace, which is defined by the
# Organization + ServiceDefinition (group, version) + the ControlPlane.
unique_together = [("name", "organization", "context")]
class urls(urlman.Urls):
base = "{self.organization.urls.instances}{self.name}/"