Skip to content

Commit a73ae31

Browse files
authored
Merge pull request #772 from jrafanie/add-provision-via-terraform-enterprise
Add provisioning via automation manager such as terraform enterprise
2 parents 6864b63 + 87d9164 commit a73ae31

File tree

19 files changed

+1177
-0
lines changed

19 files changed

+1177
-0
lines changed

content/automate/ManageIQ/AutomationManagement/AutomationManager/Lifecycle.class/__class__.yaml

Lines changed: 613 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
object_type: instance
3+
version: 1.0
4+
object:
5+
attributes:
6+
display_name:
7+
name: Provisioning
8+
inherits:
9+
description:
10+
fields:
11+
- Relationship5:
12+
value: "/AutomationManagement/AutomationManager/Provisioning/Profile/${/#user.normalized_ldap_group}#get_state_machine"
13+
- Relationship6:
14+
value: "/AutomationManagement/AutomationManager/Provisioning/StateMachines/${/#state_machine}/default"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
object_type: class
3+
version: 1.0
4+
object:
5+
attributes:
6+
description: Profile
7+
display_name:
8+
name: Profile
9+
type:
10+
inherits:
11+
visibility:
12+
owner:
13+
schema:
14+
- field:
15+
aetype: attribute
16+
name: state_machine
17+
display_name:
18+
datatype: string
19+
priority: 9
20+
owner:
21+
default_value: Provision
22+
substitute: true
23+
message: get_state_machine
24+
visibility:
25+
collect: "/state_machine = state_machine"
26+
scope:
27+
description:
28+
condition:
29+
on_entry:
30+
on_exit:
31+
on_error:
32+
max_retries:
33+
max_time:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
object_type: instance
3+
version: 1.0
4+
object:
5+
attributes:
6+
display_name:
7+
name: ".missing"
8+
inherits:
9+
description:
10+
fields: []
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
object_type: instance
3+
version: 1.0
4+
object:
5+
attributes:
6+
display_name:
7+
name: EvmGroup-super_administrator
8+
inherits:
9+
description:
10+
fields: []
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
---
2+
object_type: class
3+
version: 1.0
4+
object:
5+
attributes:
6+
description:
7+
display_name:
8+
name: Methods
9+
type:
10+
inherits:
11+
visibility:
12+
owner:
13+
schema:
14+
- field:
15+
aetype: relationship
16+
name: rel1
17+
display_name: ''
18+
datatype: string
19+
priority: 1
20+
owner:
21+
default_value:
22+
substitute: true
23+
message: create
24+
visibility:
25+
collect:
26+
scope:
27+
description:
28+
condition:
29+
on_entry:
30+
on_exit:
31+
on_error:
32+
max_retries:
33+
max_time:
34+
- field:
35+
aetype: method
36+
name: meth1
37+
display_name: ''
38+
datatype: string
39+
priority: 2
40+
owner:
41+
default_value:
42+
substitute: true
43+
message: create
44+
visibility:
45+
collect:
46+
scope:
47+
description:
48+
condition:
49+
on_entry:
50+
on_exit:
51+
on_error:
52+
max_retries:
53+
max_time:
54+
- field:
55+
aetype: relationship
56+
name: common_rel1
57+
display_name: ''
58+
datatype: string
59+
priority: 15
60+
owner:
61+
default_value:
62+
substitute: true
63+
message: "*"
64+
visibility:
65+
collect:
66+
scope:
67+
description:
68+
condition:
69+
on_entry:
70+
on_exit:
71+
on_error:
72+
max_retries:
73+
max_time:
74+
- field:
75+
aetype: method
76+
name: common_meth1
77+
display_name: ''
78+
datatype: string
79+
priority: 16
80+
owner:
81+
default_value:
82+
substitute: true
83+
message: "*"
84+
visibility:
85+
collect:
86+
scope:
87+
description:
88+
condition:
89+
on_entry:
90+
on_exit:
91+
on_error:
92+
max_retries:
93+
max_time:
94+
- field:
95+
aetype: relationship
96+
name: common_rel2
97+
display_name:
98+
datatype: string
99+
priority: 17
100+
owner:
101+
default_value:
102+
substitute: true
103+
message: "*"
104+
visibility:
105+
collect:
106+
scope:
107+
description:
108+
condition:
109+
on_entry:
110+
on_exit:
111+
on_error:
112+
max_retries:
113+
max_time:
114+
- field:
115+
aetype: method
116+
name: common_meth2
117+
display_name:
118+
datatype: string
119+
priority: 18
120+
owner:
121+
default_value:
122+
substitute: true
123+
message: "*"
124+
visibility:
125+
collect:
126+
scope:
127+
description:
128+
condition:
129+
on_entry:
130+
on_exit:
131+
on_error:
132+
max_retries:
133+
max_time:
134+
- field:
135+
aetype: relationship
136+
name: common_rel3
137+
display_name:
138+
datatype: string
139+
priority: 19
140+
owner:
141+
default_value:
142+
substitute: true
143+
message: "*"
144+
visibility:
145+
collect:
146+
scope:
147+
description:
148+
condition:
149+
on_entry:
150+
on_exit:
151+
on_error:
152+
max_retries:
153+
max_time:
154+
- field:
155+
aetype: relationship
156+
name: common_meth3
157+
display_name:
158+
datatype: string
159+
priority: 20
160+
owner:
161+
default_value:
162+
substitute: true
163+
message: "*"
164+
visibility:
165+
collect:
166+
scope:
167+
description:
168+
condition:
169+
on_entry:
170+
on_exit:
171+
on_error:
172+
max_retries:
173+
max_time:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#
2+
# Description: Trigger internal state machine that performs the actual provisioning.
3+
#
4+
module ManageIQ
5+
module Automate
6+
module AutomationManagement
7+
module AutomationManager
8+
module Provisioning
9+
module StateMachines
10+
module Methods
11+
class Provision
12+
def initialize(handle = $evm)
13+
@handle = handle
14+
end
15+
16+
def main
17+
@handle.root['miq_provision_task'].execute
18+
end
19+
end
20+
end
21+
end
22+
end
23+
end
24+
end
25+
end
26+
end
27+
28+
ManageIQ::Automate::AutomationManagement::AutomationManager::Provisioning::StateMachines::Methods::Provision.new.main
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
object_type: method
3+
version: 1.0
4+
object:
5+
attributes:
6+
name: provision
7+
display_name:
8+
description:
9+
scope: instance
10+
language: ruby
11+
location: inline
12+
inputs: []
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
object_type: instance
3+
version: 1.0
4+
object:
5+
attributes:
6+
display_name:
7+
name: PostProvision
8+
inherits:
9+
description:
10+
fields: []
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
object_type: instance
3+
version: 1.0
4+
object:
5+
attributes:
6+
display_name:
7+
name: PreProvision
8+
inherits:
9+
description:
10+
fields: []

0 commit comments

Comments
 (0)