generated from coulomb/repo-seed
feat: add vsm hub metadata
Some checks failed
Build and Deploy / build-push-deploy (push) Has been cancelled
Some checks failed
Build and Deploy / build-push-deploy (push) Has been cancelled
This commit is contained in:
@@ -94,7 +94,7 @@ tsSdkClientClass = T.unlines
|
||||
, " });"
|
||||
, " }"
|
||||
, ""
|
||||
, " async createHub(body: { slug: string; name: string; domain: string; hubKind?: 'domain' | 'shared' }) {"
|
||||
, " async createHub(body: { slug: string; name: string; domain: string; hubKind?: 'domain' | 'shared'; hubFamily?: 'vsm'; vsmFunction?: string; vsmSystem?: '1' | '2' | '3' | '3*' | '4' | '5' | 'environment' }) {"
|
||||
, " return this.fetch('/hubs', 'POST', body).then(r => r.json());"
|
||||
, " }"
|
||||
, ""
|
||||
@@ -177,8 +177,12 @@ pyClientClass = T.unlines
|
||||
, " with urllib.request.urlopen(req) as resp:"
|
||||
, " return json.loads(resp.read())"
|
||||
, ""
|
||||
, " def create_hub(self, slug: str, name: str, domain: str, hub_kind: str = 'domain') -> dict:"
|
||||
, " return self._request('/hubs', 'POST', {'slug': slug, 'name': name, 'domain': domain, 'hubKind': hub_kind})"
|
||||
, " def create_hub(self, slug: str, name: str, domain: str, hub_kind: str = 'domain', hub_family: Optional[str] = None, vsm_function: Optional[str] = None, vsm_system: Optional[str] = None) -> dict:"
|
||||
, " body: dict = {'slug': slug, 'name': name, 'domain': domain, 'hubKind': hub_kind}"
|
||||
, " if hub_family: body['hubFamily'] = hub_family"
|
||||
, " if vsm_function: body['vsmFunction'] = vsm_function"
|
||||
, " if vsm_system: body['vsmSystem'] = vsm_system"
|
||||
, " return self._request('/hubs', 'POST', body)"
|
||||
, ""
|
||||
, " def create_hub_capability_manifest(self, body: dict) -> dict:"
|
||||
, " return self._request('/hub-capability-manifests', 'POST', body)"
|
||||
|
||||
Reference in New Issue
Block a user