hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1
2023-08-10 21:53:25 +01:00
Chris Roberts
5445c2195e
Include project when looking up target
2023-06-05 14:18:06 -07:00
Chris Roberts
b6192eba0d
Fixup scoping usage to properly validate
2023-06-05 14:18:05 -07:00
Chris Roberts
7c28aa3ce8
Add Exists() helper to target
2022-07-08 16:38:02 -07:00
Chris Roberts
df0a4342a6
When project is provided set ref into data
2022-07-08 16:38:02 -07:00
Chris Roberts
9fe9492875
Only store configuration if vagrantfile defined
2022-07-08 16:38:02 -07:00
Chris Roberts
51d8c84740
Refactor how scopes are created and initialized
2022-07-08 16:38:02 -07:00
Chris Roberts
2d08919314
Merge pull request #296 from hashicorp/case-of-the-missing-target
...
Set target configuration from vagrantfile before save
2022-06-30 12:30:55 -07:00
sophia
b01ace79f0
Set default communicator constant
2022-06-30 09:13:55 -05:00
sophia
935c665412
Add tests for default communicator
2022-06-30 09:13:53 -05:00
sophia
22b2d52e00
Get communicator specified in Vagrnatfile
2022-06-30 09:13:17 -05:00
Chris Roberts
aec4d13e21
Set configuration after successful init
2022-06-29 11:46:41 -07:00
Chris Roberts
822b2af8a5
Set target configuration from vagrantfile before save
2022-06-28 11:07:52 -07:00
Chris Roberts
4475acb98d
Cleanup target init and do not create via WithTargetRef
2022-06-27 18:09:33 -07:00
Chris Roberts
70d9fa9faf
Use getters to ensure value
2022-06-27 11:24:12 -07:00
Chris Roberts
f564592651
Update target to use vagrantfile
2022-06-20 13:00:02 -07:00
Chris Roberts
7e387b6d10
Update core scopes to use Vagrantfile
2022-06-15 11:13:40 -07:00
Paul Hinze
8b5d4b8631
Update and address protobuf package deprecations
...
These changes address the following warning showing up on `go get`
operations:
go: module github.com/golang/protobuf is deprecated: Use the
"google.golang.org/protobuf" module instead.
All changes are made using the recommendations in the per-function
deprecation notices from the docs at
https://pkg.go.dev/github.com/golang/protobuf/ptypes
2022-06-08 11:51:19 -05:00
Paul Hinze
88822f5a96
Override provider for all non-active targets
...
Instead of only targets with empty providers. This helps address a
problem that @soapy1 found in review where machines that failed to come
up would get stuck with the wrong provider.
2022-05-25 16:19:50 -05:00
Paul Hinze
823b6d366c
More conservative nil checking on WithProvider to prevent panics
2022-05-25 16:19:50 -05:00
Paul Hinze
06350a7afc
Port default provider selection
...
- Pulls in the SDK changes to Project.DefaultProvider and Project.Target
- Implements the hefty default provider method
- Un-hard-codes provider from Target, and sets it when a Target is
looked up from a Project
2022-05-25 16:19:50 -05:00
Paul Hinze
625806f448
Don't delete machine datadir when SetId("") is called
...
Legacy's `Machine#id=()` has an important side effect when a nil ID is
specified - it clears the contents of the machine's DataDir.
We mirrored this behavior over to gogo, with a subtle difference - we
deleted the whole DataDir vs just its children.
It turns out the Docker provider relies on the DataDir being
cleared-but-not-removed by doing a SetId dance in its InitState action.
(see 1e6259dd00d702f83048c75c5c229ce6494c4c6e).
So here we need to mirror that behavior in order for the Docker provider
to work properly.
2022-05-25 13:41:48 -05:00
sophia
b0b3dc2a47
Remove unused target fields
2022-05-04 11:25:56 -05:00
sophia
6d1359b1f0
Get Provider from target
2022-05-04 11:22:41 -05:00
sophia
6dfca17d54
Get machine state from go impl
2022-05-04 09:32:36 -05:00
Chris Roberts
bd849581f6
Cache the machine instance of the target
2022-04-27 15:56:49 -07:00
Chris Roberts
4e6c24b631
Include target name in debug output
2022-04-27 15:56:27 -07:00
Chris Roberts
a80effe196
Do not set target into cache from options
2022-04-27 15:56:04 -07:00
Chris Roberts
7e68e25994
Seed target and machine into plugins directly
2022-04-25 12:26:58 -05:00
sophia
cfe4e71a42
Seed target ui
2022-04-25 12:26:54 -05:00
sophia
6e420689cb
Update Target State for updated states
2022-04-25 12:26:48 -05:00
Paul Hinze
61fbd0f622
Move Basis, Project, and Target seeding earlier
...
Having these objects populate their seeds during `Run` was too late for
those values to show up in command plugins, which would be seeded with
empty args instead.
h/t @chrisroberts for the debugging help and fix suggestion!
2022-04-25 12:26:47 -05:00
sophia
31e57414b4
Destroy machine + remove data dir when machine id is set to empty value
2022-04-25 12:26:11 -05:00
sophia
ba1dd33fff
Include seeds in ruby communicator
2022-04-25 12:26:09 -05:00
sophia
d57203f005
Get ruby communincator upload working
2022-04-25 12:26:09 -05:00
sophia
85f7aa1586
Make go communincator plugin work
2022-04-25 12:26:09 -05:00
sophia
b6dfff9679
Implement communicate method for core.Target
2022-04-25 12:26:07 -05:00
sophia
36dbd73945
Add endpoint for accessing basis/project/target config
2022-04-25 12:26:06 -05:00
sophia
0153f75b09
Remove unused core components
2022-04-25 12:26:06 -05:00
Chris Roberts
6b37b7ba55
Add seed functions and seed before running
2022-04-25 12:26:05 -05:00
sophia
d49944a25d
Only init targets when running a job scoped at the project or target
2022-04-25 12:26:01 -05:00
Chris Roberts
7595f1533f
Enable plugin mappers
2022-04-25 12:25:50 -05:00
sophia
b30bbcb13a
Don't check for 'found' in basis/project/target query results
2022-04-25 12:24:39 -05:00
Chris Roberts
f1a262c01f
Return stubbed value for provider name
2022-04-25 12:24:33 -05:00
Chris Roberts
71d5195fb3
Get provider name from target client
2022-04-25 12:24:33 -05:00
Chris Roberts
3f6aef88a2
Fix target loading from target index
2022-04-25 12:24:32 -05:00
Chris Roberts
87ecd2b017
Add destroy function for target, update save behavior
2022-04-25 12:24:31 -05:00
Chris Roberts
4f698c9ab2
Set resource ID into target proto for search
2022-04-25 12:24:30 -05:00
Chris Roberts
99e01aa9f9
Set target data after save
2022-04-25 12:24:29 -05:00
sophia
6cde007530
Get Vagrantfile path from project
2022-04-25 12:24:28 -05:00