k2hr3-api 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ChangeLog +24 -0
- package/app.js +7 -4
- package/bin/run.sh +218 -172
- package/bin/watcher +7 -4
- package/bin/www +7 -4
- package/config/default.json +7 -4
- package/config/development.json +7 -4
- package/config/dummyuser.json +8 -5
- package/config/extdata-dummy.sh.templ +12 -9
- package/config/k2hr3-cloud-config.txt.templ +7 -4
- package/config/k2hr3-init-error.sh.templ +8 -5
- package/config/k2hr3-init.sh.templ +127 -207
- package/config/keystone_v2.json +7 -4
- package/config/keystone_v3.json +7 -4
- package/lib/basicipcheck.js +7 -4
- package/lib/cacerts.js +7 -4
- package/lib/dbglogging.js +7 -4
- package/lib/dummyuserapi.js +7 -4
- package/lib/ipwatch.js +7 -4
- package/lib/k2hr3acrutil.js +7 -5
- package/lib/k2hr3apiutil.js +7 -4
- package/lib/k2hr3cliutil.js +7 -4
- package/lib/k2hr3config.js +7 -4
- package/lib/k2hr3cryptutil.js +7 -4
- package/lib/k2hr3dkc.js +7 -4
- package/lib/k2hr3extdata.js +7 -4
- package/lib/k2hr3keys.js +7 -4
- package/lib/k2hr3resutil.js +7 -4
- package/lib/k2hr3template.js +7 -4
- package/lib/k2hr3tokens.js +7 -4
- package/lib/k2hr3userdata.js +8 -5
- package/lib/k8soidc.js +1 -1
- package/lib/openstackapiv2.js +7 -4
- package/lib/openstackapiv3.js +7 -4
- package/lib/openstackep.js +7 -4
- package/package.json +73 -72
- package/routes/acr.js +7 -4
- package/routes/debugVerify.js +7 -4
- package/routes/extdata.js +7 -4
- package/routes/list.js +7 -4
- package/routes/policy.js +7 -4
- package/routes/resource.js +7 -4
- package/routes/role.js +7 -4
- package/routes/service.js +7 -4
- package/routes/userTokens.js +7 -4
- package/routes/userdata.js +7 -4
- package/routes/version.js +7 -4
- package/templ/Dockerfile.templ +35 -52
- package/{test → tests}/auto_acr.js +7 -4
- package/{test → tests}/auto_acr_spec.js +7 -4
- package/{test → tests}/auto_all_spec.js +7 -4
- package/{test → tests}/auto_common.js +7 -4
- package/tests/auto_control_subprocess.sh +239 -0
- package/{test → tests}/auto_extdata.js +7 -4
- package/{test → tests}/auto_extdata_spec.js +7 -4
- package/tests/auto_init_config_json.sh +275 -0
- package/{test → tests}/auto_k2hdkc_server.ini +7 -4
- package/{test → tests}/auto_k2hdkc_slave.ini +7 -4
- package/{test → tests}/auto_list.js +7 -4
- package/{test → tests}/auto_list_spec.js +7 -4
- package/{test → tests}/auto_policy.js +7 -4
- package/{test → tests}/auto_policy_spec.js +7 -4
- package/{test → tests}/auto_resource.js +7 -4
- package/{test → tests}/auto_resource_spec.js +7 -4
- package/{test → tests}/auto_role.js +7 -4
- package/{test → tests}/auto_role_spec.js +7 -4
- package/{test → tests}/auto_service.js +7 -4
- package/{test → tests}/auto_service_spec.js +7 -4
- package/{test → tests}/auto_subprocesses.js +14 -11
- package/tests/auto_template.sh +126 -0
- package/{test → tests}/auto_token_util.js +7 -4
- package/{test → tests}/auto_userdata.js +7 -4
- package/{test → tests}/auto_userdata_spec.js +7 -4
- package/{test → tests}/auto_usertokens.js +7 -4
- package/{test → tests}/auto_usertokens_spec.js +7 -4
- package/{test → tests}/auto_version.js +7 -4
- package/{test → tests}/auto_version_spec.js +7 -4
- package/{test → tests}/auto_watcher.js +7 -4
- package/{test → tests}/auto_watcher_spec.js +7 -4
- package/{test → tests}/k2hdkc_test.data +7 -4
- package/tests/k2hdkc_test_load.sh +255 -0
- package/{test → tests}/k2hr3template_test.js +7 -4
- package/tests/k2hr3template_test.sh +339 -0
- package/{test → tests}/k2hr3template_test_async.js +7 -4
- package/{test → tests}/k2hr3template_test_template.result +14 -8
- package/{test → tests}/k2hr3template_test_template.txt +7 -4
- package/{test → tests}/k2hr3template_test_vars.js +7 -4
- package/{test → tests}/manual_acr_delete.js +7 -4
- package/{test → tests}/manual_acr_get.js +7 -4
- package/{test → tests}/manual_acr_postput.js +7 -4
- package/{test → tests}/manual_allusertenant_get.js +7 -4
- package/{test → tests}/manual_extdata_get.js +7 -4
- package/{test → tests}/manual_k2hr3keys_get.js +7 -4
- package/{test → tests}/manual_list_gethead.js +7 -4
- package/{test → tests}/manual_policy_delete.js +7 -4
- package/{test → tests}/manual_policy_gethead.js +7 -4
- package/{test → tests}/manual_policy_postput.js +7 -4
- package/{test → tests}/manual_resource_delete.js +7 -4
- package/{test → tests}/manual_resource_gethead.js +7 -4
- package/{test → tests}/manual_resource_postput.js +7 -4
- package/{test → tests}/manual_role_delete.js +7 -4
- package/{test → tests}/manual_role_gethead.js +7 -4
- package/{test → tests}/manual_role_postput.js +7 -4
- package/{test → tests}/manual_service_delete.js +7 -4
- package/{test → tests}/manual_service_gethead.js +7 -4
- package/{test → tests}/manual_service_postput.js +7 -4
- package/tests/manual_test.sh +338 -0
- package/{test → tests}/manual_userdata_get.js +7 -4
- package/{test → tests}/manual_usertoken_gethead.js +7 -4
- package/{test → tests}/manual_usertoken_postput.js +7 -4
- package/{test → tests}/manual_version_get.js +7 -4
- package/tests/run_local_test_k2hdkc.sh +174 -0
- package/tests/test.sh +331 -0
- package/test/auto_control_subprocess.sh +0 -170
- package/test/auto_init_config_json.sh +0 -246
- package/test/auto_template.sh +0 -127
- package/test/auto_test.sh +0 -321
- package/test/k2hdkc_test_load.sh +0 -198
- package/test/k2hr3template_test.sh +0 -296
- package/test/manual_test.sh +0 -321
- package/test/run_local_test_k2hdkc.sh +0 -154
package/config/default.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* K2HR3 REST API
|
|
3
3
|
*
|
|
4
|
-
* Copyright 2017 Yahoo
|
|
4
|
+
* Copyright 2017 Yahoo Japan Corporation.
|
|
5
5
|
*
|
|
6
6
|
* K2HR3 is K2hdkc based Resource and Roles and policy Rules, gathers
|
|
7
7
|
* common management information for the cloud.
|
|
@@ -86,7 +86,10 @@
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
/*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
89
|
+
* Local variables:
|
|
90
|
+
* tab-width: 4
|
|
91
|
+
* c-basic-offset: 4
|
|
92
|
+
* End:
|
|
93
|
+
* vim600: noexpandtab sw=4 ts=4 fdm=marker
|
|
94
|
+
* vim<600: noexpandtab sw=4 ts=4
|
|
92
95
|
*/
|
package/config/development.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* K2HR3 REST API
|
|
3
3
|
*
|
|
4
|
-
* Copyright 2017 Yahoo
|
|
4
|
+
* Copyright 2017 Yahoo Japan Corporation.
|
|
5
5
|
*
|
|
6
6
|
* K2HR3 is K2hdkc based Resource and Roles and policy Rules, gathers
|
|
7
7
|
* common management information for the cloud.
|
|
@@ -60,7 +60,10 @@
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
63
|
+
* Local variables:
|
|
64
|
+
* tab-width: 4
|
|
65
|
+
* c-basic-offset: 4
|
|
66
|
+
* End:
|
|
67
|
+
* vim600: noexpandtab sw=4 ts=4 fdm=marker
|
|
68
|
+
* vim<600: noexpandtab sw=4 ts=4
|
|
66
69
|
*/
|
package/config/dummyuser.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* K2HR3 REST API
|
|
3
3
|
*
|
|
4
|
-
* Copyright 2017 Yahoo
|
|
4
|
+
* Copyright 2017 Yahoo Japan Corporation.
|
|
5
5
|
*
|
|
6
6
|
* K2HR3 is K2hdkc based Resource and Roles and policy Rules, gathers
|
|
7
7
|
* common management information for the cloud.
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
|
|
33
33
|
'k2hdkc': {
|
|
34
|
-
'config': '
|
|
34
|
+
'config': 'tests/auto_k2hdkc_slave.ini',
|
|
35
35
|
'port': '18031'
|
|
36
36
|
},
|
|
37
37
|
|
|
@@ -59,7 +59,10 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
62
|
+
* Local variables:
|
|
63
|
+
* tab-width: 4
|
|
64
|
+
* c-basic-offset: 4
|
|
65
|
+
* End:
|
|
66
|
+
* vim600: noexpandtab sw=4 ts=4 fdm=marker
|
|
67
|
+
* vim<600: noexpandtab sw=4 ts=4
|
|
65
68
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# K2HR3 Frontend Web Application
|
|
4
4
|
#
|
|
5
|
-
# Copyright 2018 Yahoo
|
|
5
|
+
# Copyright 2018 Yahoo Japan Corporation.
|
|
6
6
|
#
|
|
7
7
|
# K2HR3 is K2hdkc based Resource and Roles and policy Rules, gathers
|
|
8
8
|
# common management information for the cloud.
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
#
|
|
22
22
|
# Test template for extdata
|
|
23
23
|
#
|
|
24
|
-
ROLE_NAME={{= %K2HR3_ROLE_NAME% }}
|
|
25
|
-
ROLE_TENANT={{= %K2HR3_ROLE_TENANT% }}
|
|
26
|
-
ROLE_TOKEN={{= %K2HR3_ROLE_TOKEN% }}
|
|
27
|
-
K2HR3_API_HOST={{= %K2HR3_API_HOST_URI% }}
|
|
28
|
-
ERROR_MSG={{= %K2HR3_ERROR_MSG% }}
|
|
24
|
+
ROLE_NAME="{{= %K2HR3_ROLE_NAME% }}"
|
|
25
|
+
ROLE_TENANT="{{= %K2HR3_ROLE_TENANT% }}"
|
|
26
|
+
ROLE_TOKEN="{{= %K2HR3_ROLE_TOKEN% }}"
|
|
27
|
+
K2HR3_API_HOST="{{= %K2HR3_API_HOST_URI% }}"
|
|
28
|
+
ERROR_MSG="{{= %K2HR3_ERROR_MSG% }}"
|
|
29
29
|
|
|
30
30
|
echo "ROLE_NAME: ${ROLE_NAME}"
|
|
31
31
|
echo "ROLE_TENANT: ${ROLE_TENANT}"
|
|
@@ -36,7 +36,10 @@ echo "ERROR_MSG: ${ERROR_MSG}"
|
|
|
36
36
|
exit 0
|
|
37
37
|
|
|
38
38
|
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
#
|
|
39
|
+
# Local variables:
|
|
40
|
+
# tab-width: 4
|
|
41
|
+
# c-basic-offset: 4
|
|
42
|
+
# End:
|
|
43
|
+
# vim600: noexpandtab sw=4 ts=4 fdm=marker
|
|
44
|
+
# vim<600: noexpandtab sw=4 ts=4
|
|
42
45
|
#
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# K2HR3 Frontend Web Application
|
|
4
4
|
#
|
|
5
|
-
# Copyright 2018 Yahoo
|
|
5
|
+
# Copyright 2018 Yahoo Japan Corporation.
|
|
6
6
|
#
|
|
7
7
|
# K2HR3 is K2hdkc based Resource and Roles and policy Rules, gathers
|
|
8
8
|
# common management information for the cloud.
|
|
@@ -21,7 +21,10 @@ packages:
|
|
|
21
21
|
- curl
|
|
22
22
|
|
|
23
23
|
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
24
|
+
# Local variables:
|
|
25
|
+
# tab-width: 4
|
|
26
|
+
# c-basic-offset: 4
|
|
27
|
+
# End:
|
|
28
|
+
# vim600: noexpandtab sw=4 ts=4 fdm=marker
|
|
29
|
+
# vim<600: noexpandtab sw=4 ts=4
|
|
27
30
|
#
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# K2HR3 Frontend Web Application
|
|
4
4
|
#
|
|
5
|
-
# Copyright 2018 Yahoo
|
|
5
|
+
# Copyright 2018 Yahoo Japan Corporation.
|
|
6
6
|
#
|
|
7
7
|
# K2HR3 is K2hdkc based Resource and Roles and policy Rules, gathers
|
|
8
8
|
# common management information for the cloud.
|
|
@@ -21,11 +21,14 @@
|
|
|
21
21
|
SCRIPTNAME="k2hr3-init"
|
|
22
22
|
LOGFILE="/var/log/${SCRIPTNAME}.log"
|
|
23
23
|
|
|
24
|
-
echo "
|
|
24
|
+
echo "$(date "+%Y-%m-%d %H:%M:%S,%3N") - ${SCRIPTNAME}[ERROR]: Invalid userdata for creating k2hr3-init script was specified(detail error = {{= %K2HR3_ERROR_MSG% }})" | tee -a "${LOGFILE}"
|
|
25
25
|
exit 1
|
|
26
26
|
|
|
27
27
|
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
#
|
|
28
|
+
# Local variables:
|
|
29
|
+
# tab-width: 4
|
|
30
|
+
# c-basic-offset: 4
|
|
31
|
+
# End:
|
|
32
|
+
# vim600: noexpandtab sw=4 ts=4 fdm=marker
|
|
33
|
+
# vim<600: noexpandtab sw=4 ts=4
|
|
31
34
|
#
|