Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accept yaml bytes or string filepath/url #80

Merged
merged 2 commits into from
Jul 5, 2022
Merged

Conversation

carlmontanari
Copy link
Contributor

cc @hellt

@hellt
Copy link
Collaborator

hellt commented Jul 4, 2022

I tested this method like that in boxen

case PlatformTypeCheckpointCloudguard:
		var platformDefinition []byte
		platformDefinition, err = assets.ScrapliPlatformsAssets.ReadFile("scrapli_platforms/" + CheckpointCloudguardScrapliPlatformDefinitionFile)
		if err != nil {
			return nil, fmt.Errorf("%w: scrapligo driver is not found for %q platform: %v",
				util.ErrAllocationError, pT, err)
		}

		con, err = NewScrapliConsole(
			platformDefinition,
			q.Hardware.SerialPorts[0],
			q.Credentials.Username,
			q.Credentials.Password,
			l,
			soptions.WithReturnChar("\r"),
		)

		p = &CheckpointCloudguard{
			Qemu:           q,
			ScrapliConsole: con,
		}

and it works ;)

@carlmontanari
Copy link
Contributor Author

Dope, thanks for confirming man! Will poke around w/ this a bit more today/tomorrow then merge/release!

@carlmontanari carlmontanari marked this pull request as ready for review July 5, 2022 19:59
@carlmontanari carlmontanari merged commit bc6f10f into main Jul 5, 2022
@carlmontanari carlmontanari deleted the platform-from-bytes branch July 5, 2022 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants