machinery-tool 1.19.0 → 1.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/.git_revision +1 -1
  3. data/NEWS +8 -0
  4. data/html/{upgrade.html.haml → exception.html.haml} +2 -6
  5. data/lib/html.rb +10 -6
  6. data/lib/renderer.rb +5 -0
  7. data/lib/server.rb +12 -2
  8. data/lib/system_description.rb +4 -2
  9. data/lib/version.rb +1 -1
  10. data/machinery-helper/version.go +1 -1
  11. data/man/generated/machinery.1.gz +0 -0
  12. data/manual/site/sitemap.xml +23 -23
  13. data/plugins/changed_config_files/schema/system-description-changed-config-files.schema-v9.json +160 -0
  14. data/plugins/changed_managed_files/schema/system-description-changed-managed-files.schema-v9.json +160 -0
  15. data/plugins/environment/schema/system-description-environment.schema-v9.json +17 -0
  16. data/plugins/groups/groups_renderer.rb +2 -0
  17. data/plugins/groups/schema/system-description-groups.schema-v9.json +49 -0
  18. data/plugins/os/schema/system-description-os.schema-v9.json +21 -0
  19. data/plugins/packages/packages_renderer.rb +2 -0
  20. data/plugins/packages/schema/system-description-packages.schema-v9.json +115 -0
  21. data/plugins/patterns/schema/system-description-patterns.schema-v9.json +58 -0
  22. data/plugins/repositories/repositories_renderer.rb +2 -0
  23. data/plugins/repositories/schema/system-description-repositories.schema-v9.json +165 -0
  24. data/plugins/services/schema/system-description-services.schema-v9.json +93 -0
  25. data/plugins/unmanaged_files/schema/system-description-unmanaged-files.schema-v9.json +124 -0
  26. data/plugins/users/schema/system-description-users.schema-v9.json +86 -0
  27. data/plugins/users/users_renderer.rb +4 -0
  28. data/schema/migrations/migrate7to8.rb +1 -1
  29. data/schema/migrations/migrate8to9.rb +35 -0
  30. data/schema/system-description-global.schema-v9.json +43 -0
  31. data/tools/go.rb +18 -6
  32. metadata +16 -3
@@ -0,0 +1,160 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+
4
+ "type": "object",
5
+ "required": [
6
+ "_elements"
7
+ ],
8
+ "properties": {
9
+ "_attributes": {
10
+ "type": "object",
11
+ "required": [
12
+ "extracted"
13
+ ],
14
+ "properties": {
15
+ "extracted": {
16
+ "type": "boolean"
17
+ }
18
+ }
19
+ },
20
+ "_elements": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "required": [
25
+ "name",
26
+ "package_name",
27
+ "package_version"
28
+ ],
29
+ "properties": {
30
+ "name": {
31
+ "type": "string"
32
+ },
33
+ "package_name": {
34
+ "type": "string",
35
+ "minLength": 1
36
+ },
37
+ "package_version": {
38
+ "type": "string",
39
+ "minLength": 1
40
+ }
41
+ },
42
+ "oneOf": [
43
+ {
44
+ "$ref": "#/definitions/file_changed"
45
+ },
46
+ {
47
+ "$ref": "#/definitions/file_error"
48
+ }
49
+ ]
50
+ }
51
+ }
52
+ },
53
+ "definitions": {
54
+ "file_changed": {
55
+ "required": ["status"],
56
+ "properties": {
57
+ "status": {
58
+ "enum": ["changed"]
59
+ }
60
+ },
61
+ "oneOf": [
62
+ { "$ref": "#/definitions/file_changed_modified" },
63
+ { "$ref": "#/definitions/link_changed_modified" }
64
+ ]
65
+ },
66
+ "file_changed_modified": {
67
+ "required": ["changes"],
68
+ "properties": {
69
+ "changes": {
70
+ "type": "array",
71
+ "items": {
72
+ "enum": [
73
+ "size",
74
+ "mode",
75
+ "md5",
76
+ "device_number",
77
+ "link_path",
78
+ "user",
79
+ "group",
80
+ "time",
81
+ "capabilities",
82
+ "replaced",
83
+ "other_rpm_changes",
84
+ "deleted"
85
+ ]
86
+ },
87
+ "minItems": 1
88
+ },
89
+ "mode": {
90
+ "type": "string",
91
+ "pattern": "^[0-7]{3,4}$"
92
+ },
93
+ "user": {
94
+ "type": "string",
95
+ "minLength": 1
96
+ },
97
+ "group": {
98
+ "type": "string",
99
+ "minLength": 1
100
+ },
101
+ "type": {
102
+ "enum": ["file", "dir"]
103
+ }
104
+ }
105
+ },
106
+ "link_changed_modified": {
107
+ "required": ["target", "changes", "mode", "user", "group", "type"],
108
+ "properties": {
109
+ "changes": {
110
+ "type": "array",
111
+ "items": {
112
+ "enum": [
113
+ "size",
114
+ "mode",
115
+ "md5",
116
+ "device_number",
117
+ "link_path",
118
+ "user",
119
+ "group",
120
+ "time",
121
+ "capabilities",
122
+ "replaced",
123
+ "other_rpm_changes"
124
+ ]
125
+ },
126
+ "minItems": 1
127
+ },
128
+ "mode": {
129
+ "type": "string",
130
+ "pattern": "^[0-7]{3,4}$"
131
+ },
132
+ "user": {
133
+ "type": "string",
134
+ "minLength": 1
135
+ },
136
+ "group": {
137
+ "type": "string",
138
+ "minLength": 1
139
+ },
140
+ "type": {
141
+ "enum": ["link"]
142
+ },
143
+ "target": {
144
+ "type": "string"
145
+ }
146
+ }
147
+ },
148
+ "file_error": {
149
+ "required": ["status", "error_message"],
150
+ "properties": {
151
+ "status": {
152
+ "enum": ["error"]
153
+ },
154
+ "error_message": {
155
+ "type": "string"
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+
4
+ "type": "object",
5
+ "required": ["locale"],
6
+ "properties": {
7
+ "locale": {
8
+ "type": "string",
9
+ "minLength": 1
10
+ },
11
+ "system_type": {
12
+ "type": "string",
13
+ "enum": ["local", "remote", "docker"]
14
+ }
15
+ }
16
+ }
17
+
@@ -19,6 +19,8 @@ class GroupsRenderer < Renderer
19
19
  def content(description)
20
20
  return unless description.groups
21
21
 
22
+ na_note("group ID") if description.groups.any? { |a| a[:gid].nil? }
23
+
22
24
  list do
23
25
  description.groups.each do |group|
24
26
  gid = group.gid || "N/A"
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+
4
+ "type": "object",
5
+ "required": [
6
+ "_elements"
7
+ ],
8
+ "properties": {
9
+ "_attributes": {
10
+ "type": "object"
11
+ },
12
+ "_elements": {
13
+ "type": "array",
14
+ "items": {
15
+ "type": "object",
16
+ "required": [
17
+ "name",
18
+ "password",
19
+ "gid",
20
+ "users"
21
+ ],
22
+ "properties": {
23
+ "name": {
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "password": {
28
+ "type": "string"
29
+ },
30
+ "gid": {
31
+ "type": [
32
+ "integer",
33
+ "null"
34
+ ],
35
+ "minimum": 0
36
+ },
37
+ "users": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "string",
41
+ "minLength": 1
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+
4
+ "type": "object",
5
+ "required": ["name", "version", "architecture"],
6
+ "properties": {
7
+ "name": {
8
+ "type": ["string", "null"],
9
+ "minLength": 1
10
+ },
11
+ "version": {
12
+ "type": ["string", "null"],
13
+ "minLength": 1
14
+ },
15
+ "architecture": {
16
+ "type": ["string", "null"],
17
+ "minLength": 1
18
+ }
19
+ }
20
+ }
21
+
@@ -27,6 +27,8 @@ class PackagesRenderer < Renderer
27
27
  puts "There are no packages."
28
28
  end
29
29
 
30
+ na_note("package vendor") if description.packages.any? { |a| a[:vendor] == "" }
31
+
30
32
  list do
31
33
  description.packages.each do |p|
32
34
  vendor = !p.vendor.empty? ? p.vendor : "N/A"
@@ -0,0 +1,115 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "required": [
5
+ "_elements"
6
+ ],
7
+ "oneOf": [
8
+ {
9
+ "properties": {
10
+ "_attributes": {
11
+ "type": "object",
12
+ "required": [
13
+ "package_system"
14
+ ],
15
+ "properties": {
16
+ "package_system": {
17
+ "enum": ["rpm"]
18
+ }
19
+ }
20
+ },
21
+ "_elements": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": "object",
25
+ "required": [
26
+ "name",
27
+ "version",
28
+ "release",
29
+ "arch",
30
+ "vendor",
31
+ "checksum"
32
+ ],
33
+ "properties": {
34
+ "name": {
35
+ "type": "string",
36
+ "minLength": 1
37
+ },
38
+ "version": {
39
+ "type": "string",
40
+ "minLength": 1
41
+ },
42
+ "release": {
43
+ "type": "string"
44
+ },
45
+ "arch": {
46
+ "type": "string",
47
+ "minLength": 1
48
+ },
49
+ "vendor": {
50
+ "type": "string"
51
+ },
52
+ "checksum": {
53
+ "type": "string",
54
+ "pattern": "^[a-f0-9]+$"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ },
61
+ {
62
+ "properties": {
63
+ "_attributes": {
64
+ "type": "object",
65
+ "required": [
66
+ "package_system"
67
+ ],
68
+ "properties": {
69
+ "package_system": {
70
+ "enum": ["dpkg"]
71
+ }
72
+ }
73
+ },
74
+ "_elements": {
75
+ "type": "array",
76
+ "items": {
77
+ "type": "object",
78
+ "required": [
79
+ "name",
80
+ "version",
81
+ "release",
82
+ "arch",
83
+ "vendor",
84
+ "checksum"
85
+ ],
86
+ "properties": {
87
+ "name": {
88
+ "type": "string",
89
+ "minLength": 1
90
+ },
91
+ "version": {
92
+ "type": "string",
93
+ "minLength": 1
94
+ },
95
+ "release": {
96
+ "type": "string"
97
+ },
98
+ "arch": {
99
+ "type": "string",
100
+ "minLength": 1
101
+ },
102
+ "vendor": {
103
+ "type": "string"
104
+ },
105
+ "checksum": {
106
+ "type": "string",
107
+ "pattern": "^[a-f0-9]*$"
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ ]
115
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+
4
+ "type": "object",
5
+ "required": [
6
+ "_elements"
7
+ ],
8
+ "properties": {
9
+ "_attributes": {
10
+ "type": "object"
11
+ },
12
+ "_elements": {
13
+ "oneof": [
14
+ {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "object",
18
+ "required": [
19
+ "name",
20
+ "version",
21
+ "release"
22
+ ],
23
+ "properties": {
24
+ "name": {
25
+ "type": "string",
26
+ "minLength": 1
27
+ },
28
+ "version": {
29
+ "type": "string",
30
+ "minLength": 1
31
+ },
32
+ "release": {
33
+ "type": "string",
34
+ "minLength": 1
35
+ }
36
+ }
37
+ }
38
+ },
39
+ {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "object",
43
+ "required": [
44
+ "name"
45
+ ],
46
+ "properties": {
47
+ "name": {
48
+ "type": "string",
49
+ "minLength": 1
50
+ }
51
+ }
52
+ }
53
+ }
54
+ ]
55
+ }
56
+ }
57
+ }
58
+