Skip to content

Conversation

oncilla
Copy link
Contributor

@oncilla oncilla commented Sep 2, 2019

This PR enables templating the isd.ini and as.ini from .topo files.
To template the config files for the Default.topo run
scion-pki v2 tmpl topo topology/Default.topo.


This change is Reviewable

@oncilla oncilla added c/CPPKI SCION Control-plane PKI c/tooling SCION network tools labels Sep 2, 2019
@oncilla oncilla added this to the Q3S3 milestone Sep 2, 2019
@scrye scrye added the feature New feature or request label Sep 2, 2019
Copy link
Collaborator

@lukedirtwalker lukedirtwalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 9 of 9 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @oncilla)


go/tools/scion-pki/internal/tmpl/topo.go, line 139 at r1 (raw file):

		m[ia.I] = struct{}{}
	}
	var isds []addr.ISD

Why does this function return a slice, when the return value is just used to iterate over?


go/tools/scion-pki/internal/v2/tmpl/topo.go, line 122 at r1 (raw file):

}

// topoFile is used to parse the topology description.

We should probably have this in a shared library somewhere at some point. (certainly not for this PR)


go/tools/scion-pki/internal/v2/tmpl/topo.go, line 132 at r1 (raw file):

		m[ia.I] = struct{}{}
	}
	var isds []addr.ISD

ditto

This PR enables templating the isd.ini and as.ini from `.topo` files.
To template the config files for the `Default.topo` run
`scion-pki v2 tmpl topo topology/Default.topo`.
Copy link
Contributor Author

@oncilla oncilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @lukedirtwalker)


go/tools/scion-pki/internal/tmpl/topo.go, line 139 at r1 (raw file):

Previously, lukedirtwalker (Lukas Vogel) wrote…

Why does this function return a slice, when the return value is just used to iterate over?

Done.


go/tools/scion-pki/internal/v2/tmpl/topo.go, line 122 at r1 (raw file):

Previously, lukedirtwalker (Lukas Vogel) wrote…

We should probably have this in a shared library somewhere at some point. (certainly not for this PR)

Sure. If/when we write the generator in go.


go/tools/scion-pki/internal/v2/tmpl/topo.go, line 132 at r1 (raw file):

Previously, lukedirtwalker (Lukas Vogel) wrote…

ditto

Done.

Copy link
Collaborator

@lukedirtwalker lukedirtwalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@oncilla oncilla merged commit e09809d into scionproto:master Sep 3, 2019
@oncilla oncilla deleted the pub-spki-tmpl-topo branch September 3, 2019 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/CPPKI SCION Control-plane PKI c/tooling SCION network tools feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants