Skip to content

Commit c5ec36f

Browse files
Merge pull request #4559 from communitybridge/unicron-update-util-scripts
Update util scripts
2 parents 6acf5f1 + dd0c8ac commit c5ec36f

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

utils/cla_authorization.sh

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# cla_group='b71c469a-55e7-492c-9235-fd30b31da2aa' (ONAP)
44
# lfid='lflgryglicki'
55
# TOKEN='...' - Auth0 JWT bearer token
6-
# XACL='...' - X-ACL
7-
# API_URL='https://api-gw.platform.linuxfoundation.org/cla-service/v4/cla-service/v4/'
86
# DEBUG=1 ./utils/cla_group_corporate_contributors.sh b71c469a-55e7-492c-9235-fd30b31da2aa andreasgeissler
7+
# For prod: ./m2m-token-prod.secret && API_URL='https://api-gw.platform.linuxfoundation.org/cla-service' ./utils/cla_authorization.sh b71c469a-55e7-492c-9235-fd30b31da2aa andreasgeissler
8+
# For dev: ./m2m-token-dev.secret && API_URL='https://api-gw.dev.platform.linuxfoundation.org/cla-service' ./utils/cla_authorization.sh 01af041c-fa69-4052-a23c-fb8c1d3bef24 poojapanjwani
99

1010
if [ -z "$TOKEN" ]
1111
then
@@ -19,17 +19,6 @@ then
1919
exit 1
2020
fi
2121

22-
if [ -z "$XACL" ]
23-
then
24-
XACL="$(cat ./x-acl.secret)"
25-
fi
26-
27-
if [ -z "$XACL" ]
28-
then
29-
echo "$0: XACL not specified and unable to obtain one"
30-
exit 2
31-
fi
32-
3322
if [ -z "$1" ]
3423
then
3524
echo "$0: you need to specify cla_group UUID as a 1st parameter, example: 'b71c469a-55e7-492c-9235-fd30b31da2aa', '01af041c-fa69-4052-a23c-fb8c1d3bef24'"
@@ -51,6 +40,6 @@ fi
5140

5241
if [ ! -z "$DEBUG" ]
5342
then
54-
echo "curl -s -XGET -H 'X-ACL: ${XACL}' -H 'Authorization: Bearer ${TOKEN}' -H 'Content-Type: application/json' '${API_URL}/v4/cla-services/cla/authorization?lfid=${lfid}&claGroupId=${cla_group}'"
43+
echo "curl -s -XGET -H 'Authorization: Bearer ${TOKEN}' -H 'Content-Type: application/json' \"${API_URL}/v4/cla/authorization?lfid=${lfid}&claGroupId=${cla_group}\""
5544
fi
56-
curl -s -XGET -H "X-ACL: ${XACL}" -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" "${API_URL}/v4/cla/authorization?lfid=${lfid}&claGroupId=${cla_group}"
45+
curl -s -XGET -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" "${API_URL}/v4/cla/authorization?lfid=${lfid}&claGroupId=${cla_group}"

utils/lookup_examples.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ COND="data:signature_project_id = '01af041c-fa69-4052-a23c-fb8c1d3bef24' and dat
1515
COND="data:signature_reference_id = '1527f0ec-3272-11ec-a3ed-0e7521e28b4e' and data:signature_user_ccla_company_id = 'f7c7ac9c-4dbf-4104-ab3f-6b38a26d82dc' and data:signature_project_id = '01af041c-fa69-4052-a23c-fb8c1d3bef24'" ./utils/lookup_sf.sh signatures signature_id
1616
# CCLA
1717
COND="data:signature_project_id = '01af041c-fa69-4052-a23c-fb8c1d3bef24' and data:signature_reference_id = 'f7c7ac9c-4dbf-4104-ab3f-6b38a26d82dc' and data:signature_type = 'ccla' and data:signature_reference_type = 'company' and data:signature_user_ccla_company_id is null and data:signature_approved and data:signature_signed" ./utils/lookup_sf.sh signatures signature_id
18+
# M2M token generation & API call
19+
./m2m-token-prod.secret && DEBUG=1 API_URL='https://api-gw.platform.linuxfoundation.org/cla-service' ./utils/cla_authorization.sh b71c469a-55e7-492c-9235-fd30b31da2aa andreasgeissler

0 commit comments

Comments
 (0)