Conversation
tools/flavor-convert/main.go
Outdated
|
|
||
| //writing the new flavor part into the local file | ||
| data := []byte(finalFlavorPart) | ||
| err = ioutil.WriteFile("/opt/newflavorpart.json", data, 0644) |
There was a problem hiding this comment.
better if we take this as an argument also the signing keys
There was a problem hiding this comment.
Here the output flavor part file is only a flavor collection not the signed flavor. So, we did not use any signing keys in flavor convert tool. Let us know your comments on this.
tools/flavor-convert/main.go
Outdated
| } | ||
|
|
||
| for _, template := range templates { | ||
|
|
There was a problem hiding this comment.
remove unnecessary line breaks throughout
tools/flavor-convert/main.go
Outdated
|
|
||
| var rules []hvs.PcrRules | ||
|
|
||
| if flavorname == flavor.Flavor.Meta.Description.FlavorPart { |
There was a problem hiding this comment.
if possible break functionality in methods\functions
tools/flavor-convert/go.mod
Outdated
| github.com/vmware/govmomi v0.22.2 | ||
| ) | ||
|
|
||
| replace github.com/intel-secl/intel-secl/v3 => github.com/isteffyx/intel-secl/v3 v3.2.2 |
tools/flavor-convert/main.go
Outdated
| func main() { | ||
| oldFlavorPartFilePath := flag.String("o", "", "old flavor part json file") | ||
| versionFlag := flag.Bool("version", false, "Print the current version and exit") | ||
| newFlavorPartFilePath := flag.String("n", "", "old flavor part json file") |
There was a problem hiding this comment.
update to = newflavor part json file
kwtj43
left a comment
There was a problem hiding this comment.
I couldn't build this doing...
- "cd tools/flavor-convert" and then "make" --> "cp: cannot create directory '/opt/hvs-flavortemplates': No such file or directory"
- "cd tools/flavor-convert" and then "go build main.go" --> ".\main.go:217:20: undefined: OldFlavorPart"
| @@ -0,0 +1,26 @@ | |||
| { | |||
There was a problem hiding this comment.
I don't think we should duplicate the flavor-templates (they will get out of date with the intel-secl repo). Let's just provide the tool/executable and require that the user of the converter to obtain the flavor-templates.
@ddhawal do you agree?
There was a problem hiding this comment.
@kwtj43 Do we need to provide the flavor template in user command line instead of keeping it in the tools/flavor-convert/flavortemplates folder?
There was a problem hiding this comment.
@ddhawal I have tried to import flavor template files from intel-secl repo. But I am getting "no such file or directory" error while reading.
tools/flavor-convert/go.mod
Outdated
| github.com/vmware/govmomi v0.22.2 | ||
| ) | ||
|
|
||
| replace github.com/intel-secl/intel-secl/v3 => github.com/isteffyx/intel-secl/v3 v3.4.0 |
There was a problem hiding this comment.
This tool should work with the latest Steffy's fork?
There was a problem hiding this comment.
Here in flavor convert tool, we are using flavor template and new flavor part struct from intel-secl repo. But, Since the new flavor part changes are not present in intel-secl master branch, we have pushed the flavor creation/verification changes in our own repo (isteffyx/intel-secl) and replaced the intel-secl path with this repo path in go mod file. Once the flavor creation/verification changes are merged with intel-secl master branch, we will remove this path from go mod file.
@kwtj43 To build Flavorconvert tool, cd tools/flavor-convert and then "make all" |
tools/flavor-convert/Makefile
Outdated
| VERSION := $(or ${GITTAG}, v0.0.0) | ||
|
|
||
| all: | ||
| rm -rf /opt/hvs-flavortemplates |
There was a problem hiding this comment.
Similar to the flavor-gen, don't build things in the user's /opt directory. Put the output of make in a subdir of the project. On Windows...
$ make all
rm -rf /opt/hvs-flavortemplates
cp -r flavortemplates /opt/hvs-flavortemplates
cp: cannot create directory '/opt/hvs-flavortemplates': No such file or directory
There was a problem hiding this comment.
We have read the flavor template files from the flavortemplates folder that is the subdirectory of the project.
Included the ESXI flavor templates. |
Included the flavor convert tool in tools repo.