Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed Jan 3, 2025
1 parent 94ada82 commit 7c95a4f
Show file tree
Hide file tree
Showing 17 changed files with 64 additions and 7 deletions.
1 change: 0 additions & 1 deletion config/commands/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ include_options: [global/*]
subcommands:
- name: create
wait: Ready
links: [skupper/site-configuration]
description: |
Create a site.
examples: |
Expand Down
6 changes: 0 additions & 6 deletions config/commands/token.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ subcommands:
wait: Ready
resource: access-grant
platforms: [Kubernetes]
# XXX Inherit! vv
related_concepts: [access-token]
related_resources: [access-grant, access-token]
related_commands: [token/redeem]
links: [skupper/site-linking]
description: |
Expand Down Expand Up @@ -78,9 +75,6 @@ subcommands:
enable it.
- name: redeem
resource: access-token
# XXX Inherit!
related_concepts: [access-token]
related_resources: [access-grant, access-token]
related_commands: [token/issue]
links: [skupper/site-linking]
description: |
Expand Down
2 changes: 2 additions & 0 deletions input/commands/connector/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ refdog_links:
url: /resources/connector.html
- title: Listener create command
url: /commands/listener/create.html
- title: Listener command
url: /commands/listener/index.html
refdog_object_has_attributes: true
---

Expand Down
2 changes: 2 additions & 0 deletions input/commands/connector/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ refdog_links:
url: /resources/connector.html
- title: Listener delete command
url: /commands/listener/delete.html
- title: Listener command
url: /commands/listener/index.html
refdog_object_has_attributes: true
---

Expand Down
2 changes: 2 additions & 0 deletions input/commands/connector/generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ refdog_links:
url: /resources/connector.html
- title: Listener generate command
url: /commands/listener/generate.html
- title: Listener command
url: /commands/listener/index.html
refdog_object_has_attributes: true
---

Expand Down
2 changes: 2 additions & 0 deletions input/commands/connector/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ refdog_links:
url: /resources/connector.html
- title: Listener status command
url: /commands/listener/status.html
- title: Listener command
url: /commands/listener/index.html
refdog_object_has_attributes: true
---

Expand Down
2 changes: 2 additions & 0 deletions input/commands/connector/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ refdog_links:
url: /resources/connector.html
- title: Listener update command
url: /commands/listener/update.html
- title: Listener command
url: /commands/listener/index.html
refdog_object_has_attributes: true
---

Expand Down
2 changes: 2 additions & 0 deletions input/commands/link/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ refdog_links:
url: /concepts/link.html
- title: Link resource
url: /resources/link.html
- title: Token command
url: /commands/token/index.html
refdog_object_has_attributes: true
---

Expand Down
2 changes: 2 additions & 0 deletions input/commands/link/generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ refdog_links:
url: /concepts/link.html
- title: Link resource
url: /resources/link.html
- title: Token command
url: /commands/token/index.html
refdog_object_has_attributes: true
---

Expand Down
2 changes: 2 additions & 0 deletions input/commands/link/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ refdog_links:
url: /concepts/link.html
- title: Link resource
url: /resources/link.html
- title: Token command
url: /commands/token/index.html
refdog_object_has_attributes: true
---

Expand Down
2 changes: 2 additions & 0 deletions input/commands/link/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ refdog_links:
url: /concepts/link.html
- title: Link resource
url: /resources/link.html
- title: Token command
url: /commands/token/index.html
refdog_object_has_attributes: true
---

Expand Down
2 changes: 2 additions & 0 deletions input/commands/listener/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ refdog_links:
url: /resources/listener.html
- title: Connector create command
url: /commands/connector/create.html
- title: Connector command
url: /commands/connector/index.html
refdog_object_has_attributes: true
---

Expand Down
2 changes: 2 additions & 0 deletions input/commands/listener/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ refdog_links:
url: /resources/listener.html
- title: Connector delete command
url: /commands/connector/delete.html
- title: Connector command
url: /commands/connector/index.html
refdog_object_has_attributes: true
---

Expand Down
2 changes: 2 additions & 0 deletions input/commands/listener/generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ refdog_links:
url: /resources/listener.html
- title: Connector generate command
url: /commands/connector/generate.html
- title: Connector command
url: /commands/connector/index.html
refdog_object_has_attributes: true
---

Expand Down
2 changes: 2 additions & 0 deletions input/commands/listener/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ refdog_links:
url: /resources/listener.html
- title: Connector status command
url: /commands/connector/status.html
- title: Connector command
url: /commands/connector/index.html
refdog_object_has_attributes: true
---

Expand Down
2 changes: 2 additions & 0 deletions input/commands/listener/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ refdog_links:
url: /resources/listener.html
- title: Connector update command
url: /commands/connector/update.html
- title: Connector command
url: /commands/connector/index.html
refdog_object_has_attributes: true
---

Expand Down
36 changes: 36 additions & 0 deletions python/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,42 @@ def description(self):

return value

@property
def related_concepts(self):
concepts = list(super().related_concepts)

if self.parent:
concepts.extend(self.parent.related_concepts)

return concepts

@property
def related_resources(self):
resources = list(super().related_resources)

if self.parent:
resources.extend(self.parent.related_resources)

return resources

@property
def related_commands(self):
commands = list(super().related_commands)

if self.parent:
commands.extend(self.parent.related_commands)

return commands

@property
def links(self):
links = set(super().links)

if self.parent:
links.update(self.parent.links)

return links

class Option(ModelObjectAttribute):
type = object_property("type")
required = object_property("required", default=False)
Expand Down

0 comments on commit 7c95a4f

Please sign in to comment.