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

Change for customer Name #3939

Merged
merged 3 commits into from
Nov 14, 2024
Merged

Change for customer Name #3939

merged 3 commits into from
Nov 14, 2024

Conversation

talktovikas
Copy link
Collaborator

@talktovikas talktovikas commented Nov 4, 2024

Description

This is for https://progresssoftware.atlassian.net/browse/CHEF-16635

[Please describe what this change achieves]

Issues Resolved

[List any existing issues this PR resolves, or any Discourse or
StackOverflow discussions that are relevant]

Check List

@talktovikas talktovikas requested review from a team as code owners November 4, 2024 10:56
Copy link

netlify bot commented Nov 4, 2024

👷 Deploy Preview for chef-server processing.

Name Link
🔨 Latest commit 17b1f31
🔍 Latest deploy log https://app.netlify.com/sites/chef-server/deploys/6730c50caf5522000974625f

@talktovikas
Copy link
Collaborator Author

@talktovikas
Copy link
Collaborator Author

@talktovikas talktovikas changed the base branch from main to feature/CHEF-11396 November 11, 2024 16:26
Signed-off-by: talktovikas <[email protected]>

removing trailing space.

Signed-off-by: talktovikas <[email protected]>

fixing tests.

Signed-off-by: talktovikas <[email protected]>

fixing license test case.

Signed-off-by: talktovikas <[email protected]>

Fixing bug in condition statement

Signed-off-by: talktovikas <[email protected]>

debug statements

Signed-off-by: talktovikas <[email protected]>

adding the server url.

Signed-off-by: talktovikas <[email protected]>

assignment in case of standalone chef-server.

Signed-off-by: talktovikas <[email protected]>

adding licenseId in case of Automate-T data.

Signed-off-by: talktovikas <[email protected]>

fixing T-test cases.

Signed-off-by: talktovikas <[email protected]>

fixing tests.

Signed-off-by: talktovikas <[email protected]>

fixing tests.

Signed-off-by: talktovikas <[email protected]>
Signed-off-by: talktovikas <[email protected]>

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

CN.

determine_license_id()->
{_Lic, _Type, _GracePeriod, _ExpDate, _Msg, _CN, LicenseID} = gen_server:call(chef_license_worker, get_license),
Copy link
Contributor

Choose a reason for hiding this comment

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

chef_license:get_license()

Suggested change
{_Lic, _Type, _GracePeriod, _ExpDate, _Msg, _CN, LicenseID} = gen_server:call(chef_license_worker, get_license),
{_Lic, _Type, _GracePeriod, _ExpDate, _Msg, _CN, LicenseID} = chef_license:get_license(),

State = #state{fqdn_select = {ok, [[{<<"property">>, <<"FQDN:node1.domain1.com">>}],
[{<<"property">>, <<"FQDN:node2.subdomain2.domain2.com">>}],
[{<<"property">>, <<"FQDN:node3.subdomain3.domain3.co.uk">>}]]},
should_send = true,
user_emails = [[{<<"email">>, <<"[email protected]">>}]],
nodes_count = 10
},
Expected = #expected{company_name = <<"testorg">>,
{_Lic, _Type, _GracePeriod, _ExpDate, _Msg, CN,_} = gen_server:call(chef_license_worker, get_license),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{_Lic, _Type, _GracePeriod, _ExpDate, _Msg, CN,_} = gen_server:call(chef_license_worker, get_license),
{_Lic, _Type, _GracePeriod, _ExpDate, _Msg, CN,_} = chef_license:get_license(),

@@ -135,12 +141,25 @@ get_message() ->
throw(no_request)
end.

determine_license_id()->
{_Lic, _Type, _GracePeriod, _ExpDate, _Msg, _CN, LicenseID} = gen_server:call(chef_license_worker, get_license),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{_Lic, _Type, _GracePeriod, _ExpDate, _Msg, _CN, LicenseID} = gen_server:call(chef_license_worker, get_license),
{_Lic, _Type, _GracePeriod, _ExpDate, _Msg, _CN, LicenseID} = chef_license:get_license(),

Signed-off-by: talktovikas <[email protected]>
Copy link

sonarcloud bot commented Nov 14, 2024

@jashaik jashaik merged commit fdc25e0 into feature/CHEF-11396 Nov 14, 2024
6 of 7 checks passed
@jashaik jashaik deleted the vikas/telemetry_change branch November 14, 2024 07:02
jashaik pushed a commit that referenced this pull request Nov 14, 2024
* adding company name and license-id from automate license.

Signed-off-by: talktovikas <[email protected]>

removing trailing space.

Signed-off-by: talktovikas <[email protected]>

fixing tests.

Signed-off-by: talktovikas <[email protected]>

fixing license test case.

Signed-off-by: talktovikas <[email protected]>

Fixing bug in condition statement

Signed-off-by: talktovikas <[email protected]>

debug statements

Signed-off-by: talktovikas <[email protected]>

adding the server url.

Signed-off-by: talktovikas <[email protected]>

assignment in case of standalone chef-server.

Signed-off-by: talktovikas <[email protected]>

adding licenseId in case of Automate-T data.

Signed-off-by: talktovikas <[email protected]>

fixing T-test cases.

Signed-off-by: talktovikas <[email protected]>

fixing tests.

Signed-off-by: talktovikas <[email protected]>

fixing tests.

Signed-off-by: talktovikas <[email protected]>

* remove debug logs

Signed-off-by: talktovikas <[email protected]>

* code review changes.

Signed-off-by: talktovikas <[email protected]>

---------

Signed-off-by: talktovikas <[email protected]>
jashaik added a commit that referenced this pull request Nov 18, 2024
* Implementation of license enforcement application

Signed-off-by: jan shahid shaik <[email protected]>

* Fixing pipeline issues

Signed-off-by: jan shahid shaik <[email protected]>

* Fixing pipeline issues

Signed-off-by: jan shahid shaik <[email protected]>

* License Caching and Add license enforcement to all APIs (#3919)


License Caching and Add license enforcement to all APIs.

Signed-off-by: jan shahid shaik <[email protected]>

* Modified error message for license expiry case (#3926)

Signed-off-by: jan shahid shaik <[email protected]>

* Updated chef-server-ctl to handle invalid license + Added grace perio… (#3936)

* Update Gemfile.lock to fix adhoc pipeline instability

Signed-off-by: Lincoln Baker <[email protected]>

* Updated chef-server-ctl to handle invalid license + Added grace period in X-Ops-License

Signed-off-by: jan shahid shaik <[email protected]>

* Added customer name in get_license method and license cache

Signed-off-by: jan shahid shaik <[email protected]>

---------

Signed-off-by: Lincoln Baker <[email protected]>
Signed-off-by: jan shahid shaik <[email protected]>
Co-authored-by: Lincoln Baker <[email protected]>

* Change for customer Name (#3939)

* adding company name and license-id from automate license.

Signed-off-by: talktovikas <[email protected]>

removing trailing space.

Signed-off-by: talktovikas <[email protected]>

fixing tests.

Signed-off-by: talktovikas <[email protected]>

fixing license test case.

Signed-off-by: talktovikas <[email protected]>

Fixing bug in condition statement

Signed-off-by: talktovikas <[email protected]>

debug statements

Signed-off-by: talktovikas <[email protected]>

adding the server url.

Signed-off-by: talktovikas <[email protected]>

assignment in case of standalone chef-server.

Signed-off-by: talktovikas <[email protected]>

adding licenseId in case of Automate-T data.

Signed-off-by: talktovikas <[email protected]>

fixing T-test cases.

Signed-off-by: talktovikas <[email protected]>

fixing tests.

Signed-off-by: talktovikas <[email protected]>

fixing tests.

Signed-off-by: talktovikas <[email protected]>

* remove debug logs

Signed-off-by: talktovikas <[email protected]>

* code review changes.

Signed-off-by: talktovikas <[email protected]>

---------

Signed-off-by: talktovikas <[email protected]>

* Pedant test for the case if automate license is expired (#3941)

* Updated chef-server-ctl to handle invalid license + Added grace period in X-Ops-License

Signed-off-by: jan shahid shaik <[email protected]>

* Added customer name in get_license method and license cache

Signed-off-by: jan shahid shaik <[email protected]>

* debug statements

Signed-off-by: talktovikas <[email protected]>

* case for expired license.

Signed-off-by: talktovikas <[email protected]>

making it 403

Signed-off-by: talktovikas <[email protected]>

running cases only for automate.

Signed-off-by: talktovikas <[email protected]>

test for chef-zero

Signed-off-by: talktovikas <[email protected]>

test for /users

Signed-off-by: talktovikas <[email protected]>

adding env in docker

Signed-off-by: talktovikas <[email protected]>

fixing verify syntax.

Signed-off-by: talktovikas <[email protected]>

fixing placement of env variables.

Signed-off-by: talktovikas <[email protected]>

fixing placement of executor.

Signed-off-by: talktovikas <[email protected]>

test

Signed-off-by: talktovikas <[email protected]>

* adding config for expired license from vault.

Signed-off-by: talktovikas <[email protected]>

* Added few puts inside success licese case.

Signed-off-by: sreepuramsudheer <[email protected]>

* Added IS_AUTOMATE into environment variables.

Signed-off-by: sreepuramsudheer <[email protected]>

* Replaced hardcoded expired license with one received from vault.

Signed-off-by: sreepuramsudheer <[email protected]>

* Updated chef-server-ctl to handle invalid license + Added grace period in X-Ops-License

Signed-off-by: jan shahid shaik <[email protected]>

* Added customer name in get_license method and license cache

Signed-off-by: jan shahid shaik <[email protected]>

* removing debug logs

Signed-off-by: talktovikas <[email protected]>

* code review changes.

Signed-off-by: talktovikas <[email protected]>

* adding comment for the test case.

Signed-off-by: talktovikas <[email protected]>

---------

Signed-off-by: jan shahid shaik <[email protected]>
Signed-off-by: talktovikas <[email protected]>
Signed-off-by: sreepuramsudheer <[email protected]>
Co-authored-by: jan shahid shaik <[email protected]>
Co-authored-by: sreepuramsudheer <[email protected]>

* fixing the sonarQube issue.

Signed-off-by: talktovikas <[email protected]>

---------

Signed-off-by: jan shahid shaik <[email protected]>
Signed-off-by: Lincoln Baker <[email protected]>
Signed-off-by: talktovikas <[email protected]>
Signed-off-by: sreepuramsudheer <[email protected]>
Co-authored-by: Lincoln Baker <[email protected]>
Co-authored-by: Vikas Yadav <[email protected]>
Co-authored-by: sreepuramsudheer <[email protected]>
Co-authored-by: talktovikas <[email protected]>
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.

2 participants