aho 0.1.0 → 0.1.1

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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +34 -7
  3. data/.ruby-version +1 -1
  4. data/README.md +2 -2
  5. data/Rakefile +3 -3
  6. data/aho.gemspec +41 -0
  7. data/app/controllers/dsp/api/v1/agent_controller.rb +17 -0
  8. data/app/controllers/dsp/api/v1/base_controller.rb +32 -0
  9. data/app/controllers/dsp/api/v1/config_controller.rb +20 -0
  10. data/app/controllers/dsp/api/v1/healthcheck_controller.rb +29 -0
  11. data/app/controllers/dsp/api/v1/metrics_controller.rb +13 -0
  12. data/config/default.aho.yml +36 -0
  13. data/config/puma.rb +5 -0
  14. data/config/routes.rb +10 -0
  15. data/config.ru +5 -0
  16. data/exe/aho +6 -3
  17. data/lib/aho/configuration.rb +43 -0
  18. data/lib/aho/errors.rb +19 -0
  19. data/lib/aho/metrics/active.rb +58 -0
  20. data/lib/aho/metrics/ignore.rb +23 -0
  21. data/lib/aho/metrics_aggregator.rb +29 -0
  22. data/lib/aho/metrics_builder.rb +14 -0
  23. data/lib/aho/metrics_formatter.rb +7 -0
  24. data/lib/aho/metrics_log_device.rb +10 -0
  25. data/lib/aho/metrics_logger/period.rb +27 -0
  26. data/lib/aho/metrics_logger.rb +24 -0
  27. data/lib/aho/schema/parser.rb +45 -0
  28. data/lib/aho/schema/validator.rb +55 -0
  29. data/lib/aho/version.rb +1 -1
  30. data/lib/aho/web_server/application.rb +44 -0
  31. data/lib/aho/web_server/router.rb +34 -0
  32. data/lib/aho.rb +49 -7
  33. data/lib/extensions/dot_hash.rb +29 -0
  34. data/lib/extensions/hash/deep_mergeable.rb +24 -0
  35. data/lib/extensions/hash.rb +43 -0
  36. data/openapi.yml +386 -0
  37. metadata +100 -15
  38. data/.idea/.gitignore +0 -8
  39. data/.idea/aho.iml +0 -77
  40. data/.idea/misc.xml +0 -4
  41. data/.idea/modules.xml +0 -8
  42. data/.idea/vcs.xml +0 -6
metadata CHANGED
@@ -1,31 +1,92 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Panasenkov A.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-10 00:00:00.000000000 Z
11
+ date: 2025-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rspec
14
+ name: puma
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.2'
20
- type: :development
19
+ version: '6.4'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 6.4.3
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '6.4'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 6.4.3
33
+ - !ruby/object:Gem::Dependency
34
+ name: rack
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '3.1'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 3.1.8
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '3.1'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 3.1.8
53
+ - !ruby/object:Gem::Dependency
54
+ name: rackup
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '2.1'
60
+ type: :runtime
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '2.1'
67
+ - !ruby/object:Gem::Dependency
68
+ name: rake
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '13.2'
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 13.2.1
77
+ type: :runtime
21
78
  prerelease: false
22
79
  version_requirements: !ruby/object:Gem::Requirement
23
80
  requirements:
24
81
  - - "~>"
25
82
  - !ruby/object:Gem::Version
26
- version: '3.2'
27
- description: Aho agent is responsible for collecting resource usage data of VM instances
28
- on individual Compute nodes within an Datamart Platform Studio deployment.
83
+ version: '13.2'
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 13.2.1
87
+ description: |-
88
+ Aho agent is responsible for collecting resource usage data of VM instances on \
89
+ individual Compute nodes within an Datamart Platform Studio deployment.
29
90
  email:
30
91
  - aapanasenkov@gmail.com
31
92
  executables:
@@ -33,20 +94,43 @@ executables:
33
94
  extensions: []
34
95
  extra_rdoc_files: []
35
96
  files:
36
- - ".idea/.gitignore"
37
- - ".idea/aho.iml"
38
- - ".idea/misc.xml"
39
- - ".idea/modules.xml"
40
- - ".idea/vcs.xml"
41
97
  - ".rspec"
42
98
  - ".rubocop.yml"
43
99
  - ".ruby-version"
44
100
  - CHANGELOG.md
45
101
  - README.md
46
102
  - Rakefile
103
+ - aho.gemspec
104
+ - app/controllers/dsp/api/v1/agent_controller.rb
105
+ - app/controllers/dsp/api/v1/base_controller.rb
106
+ - app/controllers/dsp/api/v1/config_controller.rb
107
+ - app/controllers/dsp/api/v1/healthcheck_controller.rb
108
+ - app/controllers/dsp/api/v1/metrics_controller.rb
109
+ - config.ru
110
+ - config/default.aho.yml
111
+ - config/puma.rb
112
+ - config/routes.rb
47
113
  - exe/aho
48
114
  - lib/aho.rb
115
+ - lib/aho/configuration.rb
116
+ - lib/aho/errors.rb
117
+ - lib/aho/metrics/active.rb
118
+ - lib/aho/metrics/ignore.rb
119
+ - lib/aho/metrics_aggregator.rb
120
+ - lib/aho/metrics_builder.rb
121
+ - lib/aho/metrics_formatter.rb
122
+ - lib/aho/metrics_log_device.rb
123
+ - lib/aho/metrics_logger.rb
124
+ - lib/aho/metrics_logger/period.rb
125
+ - lib/aho/schema/parser.rb
126
+ - lib/aho/schema/validator.rb
49
127
  - lib/aho/version.rb
128
+ - lib/aho/web_server/application.rb
129
+ - lib/aho/web_server/router.rb
130
+ - lib/extensions/dot_hash.rb
131
+ - lib/extensions/hash.rb
132
+ - lib/extensions/hash/deep_mergeable.rb
133
+ - openapi.yml
50
134
  - sig/aho.rbs
51
135
  homepage: https://datamart.ru/aho
52
136
  licenses: []
@@ -54,6 +138,7 @@ metadata:
54
138
  homepage_uri: https://datamart.ru/aho
55
139
  source_code_uri: https://gitlab.datamart.ru/datamart/aho
56
140
  changelog_uri: https://gitlab.datamart.ru/datamart/aho/CHANGELOG.md
141
+ rubygems_mfa_required: 'true'
57
142
  post_install_message:
58
143
  rdoc_options: []
59
144
  require_paths:
@@ -62,14 +147,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
147
  requirements:
63
148
  - - ">="
64
149
  - !ruby/object:Gem::Version
65
- version: 3.0.0
150
+ version: 3.3.0
66
151
  required_rubygems_version: !ruby/object:Gem::Requirement
67
152
  requirements:
68
153
  - - ">="
69
154
  - !ruby/object:Gem::Version
70
155
  version: '0'
71
156
  requirements: []
72
- rubygems_version: 3.5.6
157
+ rubygems_version: 3.5.22
73
158
  signing_key:
74
159
  specification_version: 4
75
160
  summary: Aho agent for billing, monitoring and audit data from resources.
data/.idea/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- # Default ignored files
2
- /shelf/
3
- /workspace.xml
4
- # Editor-based HTTP Client requests
5
- /httpRequests/
6
- # Datasource local storage ignored files
7
- /dataSources/
8
- /dataSources.local.xml
data/.idea/aho.iml DELETED
@@ -1,77 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="RUBY_MODULE" version="4">
3
- <component name="ModuleRunConfigurationManager">
4
- <shared />
5
- </component>
6
- <component name="NewModuleRootManager">
7
- <content url="file://$MODULE_DIR$">
8
- <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
- <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
- <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
- </content>
12
- <orderEntry type="jdk" jdkName="RVM: ruby-3.2.2" jdkType="RUBY_SDK" />
13
- <orderEntry type="sourceFolder" forTests="false" />
14
- <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, RVM: ruby-3.2.2) [gem]" level="application" />
15
- <orderEntry type="library" scope="PROVIDED" name="bundler (v2.5.6, RVM: ruby-3.2.2) [gem]" level="application" />
16
- <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.1, RVM: ruby-3.2.2) [gem]" level="application" />
17
- <orderEntry type="library" scope="PROVIDED" name="json (v2.7.1, RVM: ruby-3.2.2) [gem]" level="application" />
18
- <orderEntry type="library" scope="PROVIDED" name="language_server-protocol (v3.17.0.3, RVM: ruby-3.2.2) [gem]" level="application" />
19
- <orderEntry type="library" scope="PROVIDED" name="parallel (v1.24.0, RVM: ruby-3.2.2) [gem]" level="application" />
20
- <orderEntry type="library" scope="PROVIDED" name="parser (v3.3.0.5, RVM: ruby-3.2.2) [gem]" level="application" />
21
- <orderEntry type="library" scope="PROVIDED" name="racc (v1.7.3, RVM: ruby-3.2.2) [gem]" level="application" />
22
- <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, RVM: ruby-3.2.2) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="rake (v13.1.0, RVM: ruby-3.2.2) [gem]" level="application" />
24
- <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.9.0, RVM: ruby-3.2.2) [gem]" level="application" />
25
- <orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.6, RVM: ruby-3.2.2) [gem]" level="application" />
26
- <orderEntry type="library" scope="PROVIDED" name="rspec (v3.13.0, RVM: ruby-3.2.2) [gem]" level="application" />
27
- <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.13.0, RVM: ruby-3.2.2) [gem]" level="application" />
28
- <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.13.0, RVM: ruby-3.2.2) [gem]" level="application" />
29
- <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.13.0, RVM: ruby-3.2.2) [gem]" level="application" />
30
- <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.13.1, RVM: ruby-3.2.2) [gem]" level="application" />
31
- <orderEntry type="library" scope="PROVIDED" name="rubocop (v1.62.0, RVM: ruby-3.2.2) [gem]" level="application" />
32
- <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.31.2, RVM: ruby-3.2.2) [gem]" level="application" />
33
- <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.13.0, RVM: ruby-3.2.2) [gem]" level="application" />
34
- <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.5.0, RVM: ruby-3.2.2) [gem]" level="application" />
35
- </component>
36
- <component name="RakeTasksCache">
37
- <option name="myRootTask">
38
- <RakeTaskImpl id="rake">
39
- <subtasks>
40
- <RakeTaskImpl description="Build aho-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
41
- <RakeTaskImpl id="build">
42
- <subtasks>
43
- <RakeTaskImpl description="Generate SHA512 checksum if aho-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
44
- </subtasks>
45
- </RakeTaskImpl>
46
- <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
47
- <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
48
- <RakeTaskImpl description="Build and install aho-0.1.0.gem into system gems" fullCommand="install" id="install" />
49
- <RakeTaskImpl id="install">
50
- <subtasks>
51
- <RakeTaskImpl description="Build and install aho-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
52
- </subtasks>
53
- </RakeTaskImpl>
54
- <RakeTaskImpl description="Create tag v0.1.0 and build and push aho-0.1.0.gem to https://gitlab.datamart.ru" fullCommand="release[remote]" id="release[remote]" />
55
- <RakeTaskImpl description="Run RuboCop" fullCommand="rubocop" id="rubocop" />
56
- <RakeTaskImpl id="rubocop">
57
- <subtasks>
58
- <RakeTaskImpl description="Autocorrect RuboCop offenses (only when it's safe)" fullCommand="rubocop:autocorrect" id="autocorrect" />
59
- <RakeTaskImpl description="Autocorrect RuboCop offenses (safe and unsafe)" fullCommand="rubocop:autocorrect_all" id="autocorrect_all" />
60
- <RakeTaskImpl description="" fullCommand="rubocop:auto_correct" id="auto_correct" />
61
- </subtasks>
62
- </RakeTaskImpl>
63
- <RakeTaskImpl description="Run RSpec code examples" fullCommand="spec" id="spec" />
64
- <RakeTaskImpl description="" fullCommand="default" id="default" />
65
- <RakeTaskImpl description="" fullCommand="release" id="release" />
66
- <RakeTaskImpl id="release">
67
- <subtasks>
68
- <RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
69
- <RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
70
- <RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
71
- </subtasks>
72
- </RakeTaskImpl>
73
- </subtasks>
74
- </RakeTaskImpl>
75
- </option>
76
- </component>
77
- </module>
data/.idea/misc.xml DELETED
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-2.6.3 [global]" project-jdk-type="RUBY_SDK" />
4
- </project>
data/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/aho.iml" filepath="$PROJECT_DIR$/.idea/aho.iml" />
6
- </modules>
7
- </component>
8
- </project>
data/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>