Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add cdn operations #460

Merged
merged 11 commits into from
Oct 30, 2024
Merged

add cdn operations #460

merged 11 commits into from
Oct 30, 2024

Conversation

digna-ionos
Copy link
Contributor

What does this fix or implement?

Checklist

  • PR name added as appropriate (e.g. feat:/fix:/doc:/test:/refactor:)
  • Tests added or updated
  • Documentation updated
  • Sonar Cloud Scan
  • Changelog updated and version incremented (label: upcoming release)
  • Github Issue linked if any
  • Jira task updated

@avirtopeanu-ionos
Copy link
Contributor

Let's also add the changes to the changelog, as well as a bats test suite, this looks good!

)

func Create() *core.Command {
cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
Copy link
Contributor

@avirtopeanu-ionos avirtopeanu-ionos Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason not to use NewCommandWithJsonProperties ?

The user might not know exactly what json we expect here for --routing-rules.

NewCommandWithJsonProperties adds two flags --json-properties and --json-properties-example. The latter if set, it prints an example json (which for example could be piped to a .json file), and exits, so the user can use that as a sort of guide

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JsonProperties is kind of vague. Having the custom name is more unambiguous. We can have a routing-rules example if we want.

Copy link
Contributor

@avirtopeanu-ionos avirtopeanu-ionos Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, then let's do that

)

func Create() *core.Command {
cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it might actually be more appropriate to have the create command use a json properties file to create the object. From what I can tell, the routing rules have quite a complex structure and it might be easier for the user to just use a properties file.

Copy link

@digna-ionos digna-ionos merged commit d979378 into master Oct 30, 2024
6 of 7 checks passed
@avirtopeanu-ionos avirtopeanu-ionos deleted the feat/cdn branch December 16, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants