chef icon indicating copy to clipboard operation
chef copied to clipboard

Base url use #major

Open MarkGibbons opened this issue 4 years ago • 4 comments

MarkGibbons avatar Jun 02 '20 04:06 MarkGibbons

This is a breaking change. By default the chef server URL will have a / slash added if none is present. If an organization is specified in the URL the global endpoint will be be computed for the functions that need to address the base chef server URL.

MarkGibbons avatar Jun 02 '20 04:06 MarkGibbons

@mudash @vsingh-msys If you get a moment. Does this one make sense to you?

MarkGibbons avatar Jun 02 '20 15:06 MarkGibbons

@MarkGibbons Looks good to me.

The only concern about additional param UseOrg & UseGlobal are passed to decide about URL construct.

If we can construct based on a) URL is relative if passed without forwarding slash "clients", "cookbooks" etc.

b) URL is absolute if passed with forwarding slash "/status", "/association_requests" etc.

that would be helpful also global URL looks much similar to chef_server_root of chef infra config.rb option.

chef_server_root 'https://localhost'
chef_server_url  'https://localhost/organizations/4thcoffee'

kvivek1115 avatar Jun 03 '20 17:06 kvivek1115

@vsingh-msys thanks for the comments. I'll take a look at using the absolute path name for the global requests. I added the UseGlobal and UseOrg to the parameter list because specifying the value explicitly seemed to make it clear which level the call was functioning on.

MarkGibbons avatar Jun 05 '20 16:06 MarkGibbons