machinery-tool 1.20.0 → 1.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.git_revision +1 -1
  3. data/NEWS +12 -0
  4. data/html/assets/bootstrap-modal.js +338 -0
  5. data/html/assets/compare/machinery.js +15 -0
  6. data/html/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  7. data/html/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  8. data/html/assets/machinery-base.css +5 -2
  9. data/html/assets/machinery-base.js +16 -1
  10. data/html/assets/machinery.css +41 -0
  11. data/html/assets/show/machinery.js +18 -0
  12. data/html/comparison.html.haml +25 -26
  13. data/html/homepage.html.haml +24 -0
  14. data/html/index.html.haml +35 -30
  15. data/html/partials/{landing_page/alert.html.haml → alert.html.haml} +0 -0
  16. data/html/partials/compare/changed_config_files.html.haml +1 -1
  17. data/html/partials/compare/changed_managed_files.html.haml +1 -1
  18. data/html/partials/compare/groups.html.haml +1 -1
  19. data/html/partials/compare/os.html.haml +1 -1
  20. data/html/partials/compare/packages.html.haml +1 -1
  21. data/html/partials/compare/pattern_list.html.haml +3 -0
  22. data/html/partials/compare/patterns.html.haml +1 -2
  23. data/html/partials/compare/repositories.html.haml +1 -1
  24. data/html/partials/compare/services.html.haml +1 -1
  25. data/html/partials/compare/unmanaged_file_list.html.haml +12 -4
  26. data/html/partials/compare/unmanaged_files.html.haml +1 -1
  27. data/html/partials/compare/users.html.haml +1 -1
  28. data/html/partials/description_selector.html.haml +57 -0
  29. data/html/partials/nav_bar.html.haml +34 -0
  30. data/html/partials/patterns.html.haml +4 -1
  31. data/html/partials/unmanaged_files.html.haml +11 -3
  32. data/lib/config_task.rb +8 -2
  33. data/lib/exceptions.rb +0 -1
  34. data/lib/server.rb +19 -2
  35. data/lib/system_description.rb +1 -1
  36. data/lib/version.rb +1 -1
  37. data/lib/zypper.rb +1 -1
  38. data/machinery-helper/machinery_helper.go +12 -4
  39. data/machinery-helper/machinery_helper_test.go +5 -1
  40. data/machinery-helper/version.go +1 -1
  41. data/man/generated/machinery.1.gz +0 -0
  42. data/manual/site/sitemap.xml +23 -23
  43. data/plugins/changed_config_files/schema/system-description-changed-config-files.schema-v10.json +160 -0
  44. data/plugins/changed_managed_files/schema/system-description-changed-managed-files.schema-v10.json +160 -0
  45. data/plugins/environment/schema/system-description-environment.schema-v10.json +17 -0
  46. data/plugins/groups/schema/system-description-groups.schema-v10.json +49 -0
  47. data/plugins/os/schema/system-description-os.schema-v10.json +21 -0
  48. data/plugins/packages/schema/system-description-packages.schema-v10.json +115 -0
  49. data/plugins/patterns/patterns_inspector.rb +2 -0
  50. data/plugins/patterns/patterns_model.rb +1 -0
  51. data/plugins/patterns/patterns_renderer.rb +4 -1
  52. data/plugins/patterns/schema/system-description-patterns.schema-v10.json +69 -0
  53. data/plugins/repositories/schema/system-description-repositories.schema-v10.json +165 -0
  54. data/plugins/services/schema/system-description-services.schema-v10.json +93 -0
  55. data/plugins/services/services_inspector.rb +40 -9
  56. data/plugins/unmanaged_files/schema/system-description-unmanaged-files.schema-v10.json +153 -0
  57. data/plugins/unmanaged_files/unmanaged_files_model.rb +8 -0
  58. data/plugins/unmanaged_files/unmanaged_files_renderer.rb +8 -2
  59. data/plugins/users/schema/system-description-users.schema-v10.json +86 -0
  60. data/schema/migrations/migrate9to10.rb +55 -0
  61. data/schema/system-description-global.schema-v10.json +43 -0
  62. metadata +23 -5
  63. data/html/landing_page.html.haml +0 -62
@@ -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
+
@@ -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
+
@@ -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
+ }
@@ -84,6 +84,7 @@ class PatternsInspector < Inspector
84
84
  end.uniq.sort_by(&:name)
85
85
 
86
86
  @description.patterns = PatternsScope.new(patterns)
87
+ @description.patterns.attributes["patterns_system"] = "zypper"
87
88
  end
88
89
 
89
90
  def inspect_with_tasksel
@@ -98,5 +99,6 @@ class PatternsInspector < Inspector
98
99
  end.uniq.sort_by(&:name)
99
100
 
100
101
  @description.patterns = PatternsScope.new(patterns)
102
+ @description.patterns.attributes["patterns_system"] = "tasksel"
101
103
  end
102
104
  end
@@ -22,6 +22,7 @@ end
22
22
  class PatternsScope < Machinery::Array
23
23
  include Machinery::Scope
24
24
 
25
+ has_attributes :patterns_system
25
26
  has_elements class: Pattern
26
27
 
27
28
  def compare_with(other)
@@ -23,10 +23,13 @@ class PatternsRenderer < Renderer
23
23
  puts "There are no patterns or tasks."
24
24
  end
25
25
 
26
- if description.packages && description.packages.package_system == "dpkg"
26
+ if description.patterns.patterns_system == "tasksel"
27
27
  puts "Note: Tasks on Debian-like systems are treated as patterns."
28
28
  end
29
29
 
30
+ puts "Pattern Manager: #{description.patterns.patterns_system}" unless
31
+ description.patterns.empty?
32
+
30
33
  list do
31
34
  description.patterns.each do |p|
32
35
  item "#{p.name}"
@@ -0,0 +1,69 @@
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
+ "patterns_system"
13
+ ],
14
+ "properties": {
15
+ "patterns_system": {
16
+ "oneOf": [
17
+ {
18
+ "enum": ["zypper", "tasksel"]
19
+ }
20
+ ]
21
+ }
22
+ }
23
+ },
24
+ "_elements": {
25
+ "oneof": [
26
+ {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "object",
30
+ "required": [
31
+ "name",
32
+ "version",
33
+ "release"
34
+ ],
35
+ "properties": {
36
+ "name": {
37
+ "type": "string",
38
+ "minLength": 1
39
+ },
40
+ "version": {
41
+ "type": "string",
42
+ "minLength": 1
43
+ },
44
+ "release": {
45
+ "type": "string",
46
+ "minLength": 1
47
+ }
48
+ }
49
+ }
50
+ },
51
+ {
52
+ "type": "array",
53
+ "items": {
54
+ "type": "object",
55
+ "required": [
56
+ "name"
57
+ ],
58
+ "properties": {
59
+ "name": {
60
+ "type": "string",
61
+ "minLength": 1
62
+ }
63
+ }
64
+ }
65
+ }
66
+ ]
67
+ }
68
+ }
69
+ }