diff --git a/config/commands.yaml b/config/commands.yaml index b401437..39f06a4 100644 --- a/config/commands.yaml +++ b/config/commands.yaml @@ -76,7 +76,7 @@ standard_options: description: | Display help and exit. groups: - - name: Sites + - name: Site configuration commands: - name: site description: | @@ -145,6 +145,7 @@ groups: options: - name: name type: string + required: false positional: true description: | The name of the site resource. @@ -179,10 +180,7 @@ groups: resource: Grant related_commands: ["token redeem"] description: | - Issue a token redeemable for a link to the current site. - - Issue a token that can be redeemed at a remote site for a - link to the current site. + Issue a token file redeemable for a link to the current site. This command first creates a grant in order to issue the token. @@ -223,7 +221,8 @@ groups: - name: token redeem related_commands: ["token issue"] description: | - Redeem a token in order to create a link to a remote site. + Redeem a token file in order to create a link to a remote + site. usage: skupper token redeem [options] output: | Waiting for status... diff --git a/config/resources.yaml b/config/resources.yaml index a97e524..47a247f 100644 --- a/config/resources.yaml +++ b/config/resources.yaml @@ -25,7 +25,7 @@ standard_properties: description: | This thing is working. groups: - - name: Sites + - name: Site configuration resources: - name: Site related_concepts: [network, namespace] diff --git a/input/commands/index.md b/input/commands/index.md index 1fb2c0a..a899815 100644 --- a/input/commands/index.md +++ b/input/commands/index.md @@ -8,7 +8,7 @@ links: # Skupper commands -#### Sites +#### Site configuration | | | |-|-| @@ -23,8 +23,8 @@ links: | | | |-|-| | [token](token.html) | Display help for token commands and exit | -| [token issue](token-issue.html) | Issue a token redeemable for a link to the current site | -| [token redeem](token-redeem.html) | Redeem a token in order to create a link to a remote site | +| [token issue](token-issue.html) | Issue a token file redeemable for a link to the current site | +| [token redeem](token-redeem.html) | Redeem a token file in order to create a link to a remote site | | [link](link.html) | Display help for link commands and exit | | [link create](link-create.html) | Create a link | | [link update](link-update.html) | Change link settings | diff --git a/input/commands/site-delete.md b/input/commands/site-delete.md index 8db8cc9..3fe4dad 100644 --- a/input/commands/site-delete.md +++ b/input/commands/site-delete.md @@ -26,7 +26,7 @@ Site "" is deleted. ## Options --

name string, required

+-

name string, optional

The name of the site resource. diff --git a/input/commands/token-issue.md b/input/commands/token-issue.md index ecdaa5f..d210e49 100644 --- a/input/commands/token-issue.md +++ b/input/commands/token-issue.md @@ -9,10 +9,7 @@ links:
-Issue a token redeemable for a link to the current site. - -Issue a token that can be redeemed at a remote site for a -link to the current site. +Issue a token file redeemable for a link to the current site. This command first creates a grant in order to issue the token. diff --git a/input/commands/token-redeem.md b/input/commands/token-redeem.md index 24b8cc6..35db699 100644 --- a/input/commands/token-redeem.md +++ b/input/commands/token-redeem.md @@ -9,7 +9,8 @@ links:
-Redeem a token in order to create a link to a remote site. +Redeem a token file in order to create a link to a remote +site.
diff --git a/input/resources/index.md b/input/resources/index.md index 8353963..00a224f 100644 --- a/input/resources/index.md +++ b/input/resources/index.md @@ -8,7 +8,7 @@ links: # Skupper resources -#### Sites +#### Site configuration | | | |-|-| diff --git a/python/commands.py b/python/commands.py index 19aebfa..317a3ec 100644 --- a/python/commands.py +++ b/python/commands.py @@ -254,8 +254,8 @@ def merge_option_data(self): if name not in standard_option_data: fail(f"Option '{name}' not in standard options") - # XXX Duplicates! - option_names = list(specific_option_data.keys()) + inherited_options + option_names = list(specific_option_data.keys()) + \ + [x for x in inherited_options if x not in specific_option_data] option_data = dict() for name in option_names: diff --git a/python/common.py b/python/common.py index 76a00ed..bae92c1 100644 --- a/python/common.py +++ b/python/common.py @@ -174,7 +174,7 @@ def related_concepts(self): try: yield self.model.concept_model.concepts_by_name[name] except KeyError: - raise # XXX An error message! + fail(f"Related concept '{name}' on {self} not found") @property def related_resources(self): @@ -190,7 +190,7 @@ def related_resources(self): try: yield self.model.resource_model.resources_by_name[name] except KeyError: - raise # XXX An error message! + fail(f"Related resource '{name}' on {self} not found") @property def related_commands(self): @@ -206,7 +206,7 @@ def related_commands(self): try: yield self.model.command_model.commands_by_name[name] except KeyError: - raise # XXX An error message! + fail(f"Related command '{name}' on {self} not found") class ModelObjectAttribute: hidden = object_property("hidden", default=False) @@ -241,4 +241,4 @@ def related_concepts(self): try: yield self.model.concept_model.concepts_by_name[name] except KeyError: - raise # XXX An error message! + fail(f"Related concept '{name}' on {self} not found") diff --git a/python/resources.py b/python/resources.py index 5fc1d4c..bf84a5d 100644 --- a/python/resources.py +++ b/python/resources.py @@ -25,10 +25,6 @@ def append(line=""): append() for group in model.groups: - # XXX - if "stuff" in group.name: - continue - append(f"#### {group.name}") append() append("| | |") @@ -96,7 +92,6 @@ def append(line=""): append() for example in resource.examples: - # XXX An example object append(example["description"].strip() + ":") append() append("~~~ yaml") @@ -185,8 +180,6 @@ def generate_property(prop, append): append("
") append() - # return "\n".join(lines) - class ResourceModel: def __init__(self): debug(f"Loading {self}") @@ -308,7 +301,7 @@ def merge_property_data(self, section): if name not in standard_prop_data: fail(f"Property '{name}' not in standard properties") - prop_names = list(specific_prop_data.keys()) + inherited_props + prop_names = list(specific_prop_data.keys()) + [x for x in inherited_props if x not in specific_prop_data] prop_data = dict() for name in prop_names: