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.
Files changed (121) hide show
  1. package/ChangeLog +24 -0
  2. package/app.js +7 -4
  3. package/bin/run.sh +218 -172
  4. package/bin/watcher +7 -4
  5. package/bin/www +7 -4
  6. package/config/default.json +7 -4
  7. package/config/development.json +7 -4
  8. package/config/dummyuser.json +8 -5
  9. package/config/extdata-dummy.sh.templ +12 -9
  10. package/config/k2hr3-cloud-config.txt.templ +7 -4
  11. package/config/k2hr3-init-error.sh.templ +8 -5
  12. package/config/k2hr3-init.sh.templ +127 -207
  13. package/config/keystone_v2.json +7 -4
  14. package/config/keystone_v3.json +7 -4
  15. package/lib/basicipcheck.js +7 -4
  16. package/lib/cacerts.js +7 -4
  17. package/lib/dbglogging.js +7 -4
  18. package/lib/dummyuserapi.js +7 -4
  19. package/lib/ipwatch.js +7 -4
  20. package/lib/k2hr3acrutil.js +7 -5
  21. package/lib/k2hr3apiutil.js +7 -4
  22. package/lib/k2hr3cliutil.js +7 -4
  23. package/lib/k2hr3config.js +7 -4
  24. package/lib/k2hr3cryptutil.js +7 -4
  25. package/lib/k2hr3dkc.js +7 -4
  26. package/lib/k2hr3extdata.js +7 -4
  27. package/lib/k2hr3keys.js +7 -4
  28. package/lib/k2hr3resutil.js +7 -4
  29. package/lib/k2hr3template.js +7 -4
  30. package/lib/k2hr3tokens.js +7 -4
  31. package/lib/k2hr3userdata.js +8 -5
  32. package/lib/k8soidc.js +1 -1
  33. package/lib/openstackapiv2.js +7 -4
  34. package/lib/openstackapiv3.js +7 -4
  35. package/lib/openstackep.js +7 -4
  36. package/package.json +73 -72
  37. package/routes/acr.js +7 -4
  38. package/routes/debugVerify.js +7 -4
  39. package/routes/extdata.js +7 -4
  40. package/routes/list.js +7 -4
  41. package/routes/policy.js +7 -4
  42. package/routes/resource.js +7 -4
  43. package/routes/role.js +7 -4
  44. package/routes/service.js +7 -4
  45. package/routes/userTokens.js +7 -4
  46. package/routes/userdata.js +7 -4
  47. package/routes/version.js +7 -4
  48. package/templ/Dockerfile.templ +35 -52
  49. package/{test → tests}/auto_acr.js +7 -4
  50. package/{test → tests}/auto_acr_spec.js +7 -4
  51. package/{test → tests}/auto_all_spec.js +7 -4
  52. package/{test → tests}/auto_common.js +7 -4
  53. package/tests/auto_control_subprocess.sh +239 -0
  54. package/{test → tests}/auto_extdata.js +7 -4
  55. package/{test → tests}/auto_extdata_spec.js +7 -4
  56. package/tests/auto_init_config_json.sh +275 -0
  57. package/{test → tests}/auto_k2hdkc_server.ini +7 -4
  58. package/{test → tests}/auto_k2hdkc_slave.ini +7 -4
  59. package/{test → tests}/auto_list.js +7 -4
  60. package/{test → tests}/auto_list_spec.js +7 -4
  61. package/{test → tests}/auto_policy.js +7 -4
  62. package/{test → tests}/auto_policy_spec.js +7 -4
  63. package/{test → tests}/auto_resource.js +7 -4
  64. package/{test → tests}/auto_resource_spec.js +7 -4
  65. package/{test → tests}/auto_role.js +7 -4
  66. package/{test → tests}/auto_role_spec.js +7 -4
  67. package/{test → tests}/auto_service.js +7 -4
  68. package/{test → tests}/auto_service_spec.js +7 -4
  69. package/{test → tests}/auto_subprocesses.js +14 -11
  70. package/tests/auto_template.sh +126 -0
  71. package/{test → tests}/auto_token_util.js +7 -4
  72. package/{test → tests}/auto_userdata.js +7 -4
  73. package/{test → tests}/auto_userdata_spec.js +7 -4
  74. package/{test → tests}/auto_usertokens.js +7 -4
  75. package/{test → tests}/auto_usertokens_spec.js +7 -4
  76. package/{test → tests}/auto_version.js +7 -4
  77. package/{test → tests}/auto_version_spec.js +7 -4
  78. package/{test → tests}/auto_watcher.js +7 -4
  79. package/{test → tests}/auto_watcher_spec.js +7 -4
  80. package/{test → tests}/k2hdkc_test.data +7 -4
  81. package/tests/k2hdkc_test_load.sh +255 -0
  82. package/{test → tests}/k2hr3template_test.js +7 -4
  83. package/tests/k2hr3template_test.sh +339 -0
  84. package/{test → tests}/k2hr3template_test_async.js +7 -4
  85. package/{test → tests}/k2hr3template_test_template.result +14 -8
  86. package/{test → tests}/k2hr3template_test_template.txt +7 -4
  87. package/{test → tests}/k2hr3template_test_vars.js +7 -4
  88. package/{test → tests}/manual_acr_delete.js +7 -4
  89. package/{test → tests}/manual_acr_get.js +7 -4
  90. package/{test → tests}/manual_acr_postput.js +7 -4
  91. package/{test → tests}/manual_allusertenant_get.js +7 -4
  92. package/{test → tests}/manual_extdata_get.js +7 -4
  93. package/{test → tests}/manual_k2hr3keys_get.js +7 -4
  94. package/{test → tests}/manual_list_gethead.js +7 -4
  95. package/{test → tests}/manual_policy_delete.js +7 -4
  96. package/{test → tests}/manual_policy_gethead.js +7 -4
  97. package/{test → tests}/manual_policy_postput.js +7 -4
  98. package/{test → tests}/manual_resource_delete.js +7 -4
  99. package/{test → tests}/manual_resource_gethead.js +7 -4
  100. package/{test → tests}/manual_resource_postput.js +7 -4
  101. package/{test → tests}/manual_role_delete.js +7 -4
  102. package/{test → tests}/manual_role_gethead.js +7 -4
  103. package/{test → tests}/manual_role_postput.js +7 -4
  104. package/{test → tests}/manual_service_delete.js +7 -4
  105. package/{test → tests}/manual_service_gethead.js +7 -4
  106. package/{test → tests}/manual_service_postput.js +7 -4
  107. package/tests/manual_test.sh +338 -0
  108. package/{test → tests}/manual_userdata_get.js +7 -4
  109. package/{test → tests}/manual_usertoken_gethead.js +7 -4
  110. package/{test → tests}/manual_usertoken_postput.js +7 -4
  111. package/{test → tests}/manual_version_get.js +7 -4
  112. package/tests/run_local_test_k2hdkc.sh +174 -0
  113. package/tests/test.sh +331 -0
  114. package/test/auto_control_subprocess.sh +0 -170
  115. package/test/auto_init_config_json.sh +0 -246
  116. package/test/auto_template.sh +0 -127
  117. package/test/auto_test.sh +0 -321
  118. package/test/k2hdkc_test_load.sh +0 -198
  119. package/test/k2hr3template_test.sh +0 -296
  120. package/test/manual_test.sh +0 -321
  121. package/test/run_local_test_k2hdkc.sh +0 -154
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * K2HR3 REST API
3
3
  *
4
- * Copyright 2017 Yahoo! Japan Corporation.
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
- * VIM modelines
90
- *
91
- * vim:set ts=4 fenc=utf-8:
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
  */
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * K2HR3 REST API
3
3
  *
4
- * Copyright 2017 Yahoo! Japan Corporation.
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
- * VIM modelines
64
- *
65
- * vim:set ts=4 fenc=utf-8:
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
  */
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * K2HR3 REST API
3
3
  *
4
- * Copyright 2017 Yahoo! Japan Corporation.
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': 'test/auto_k2hdkc_slave.ini',
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
- * VIM modelines
63
- *
64
- * vim:set ts=4 fenc=utf-8:
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! Japan Corporation.
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
- # VIM modelines
40
- #
41
- # vim:set ts=4 fenc=utf-8:
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! Japan Corporation.
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
- # VIM modelines
25
- #
26
- # vim:set ts=4 fenc=utf-8:
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! Japan Corporation.
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 "`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}
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
- # VIM modelines
29
- #
30
- # vim:set ts=4 fenc=utf-8:
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
  #