@@ -45,7 +45,7 @@ const (
4545 annotBlock = "com.urunc.unikernel.block"
4646 annotBlockMntPoint = "com.urunc.unikernel.blkMntPoint"
4747 annotMountRootfs = "com.urunc.unikernel.mountRootfs"
48- annotSolo5BlkDev = "com.urunc.unikernel.blkDev "
48+ annotBlkDev = "com.urunc.unikernel.solo5BlkDev "
4949)
5050
5151// A UnikernelConfig struct holds the info provided by bima image on how to execute our unikernel
@@ -59,7 +59,7 @@ type UnikernelConfig struct {
5959 Block string `json:"com.urunc.unikernel.block,omitempty"`
6060 BlkMntPoint string `json:"com.urunc.unikernel.blkMntPoint,omitempty"`
6161 MountRootfs string `json:"com.urunc.unikernel.mountRootfs"`
62- Solo5BlkDev string `json:"com.urunc.unikernel.blkDev ,omitempty"`
62+ BlkDev string `json:"com.urunc.unikernel.solo5BlkDev ,omitempty"`
6363}
6464
6565// validate checks if the mandatory configuration fields are present.
@@ -121,7 +121,7 @@ func getConfigFromSpec(spec *specs.Spec) *UnikernelConfig {
121121 block := spec .Annotations [annotBlock ]
122122 blkMntPoint := spec .Annotations [annotBlockMntPoint ]
123123 MountRootfs := spec .Annotations [annotMountRootfs ]
124- solo5BlkDev := spec .Annotations [annotSolo5BlkDev ]
124+ blkDev := spec .Annotations [annotBlkDev ]
125125 uniklog .WithFields (logrus.Fields {
126126 "unikernelType" : tryDecode (unikernelType ),
127127 "unikernelVersion" : tryDecode (unikernelVersion ),
@@ -132,7 +132,7 @@ func getConfigFromSpec(spec *specs.Spec) *UnikernelConfig {
132132 "block" : tryDecode (block ),
133133 "blkMntPoint" : tryDecode (blkMntPoint ),
134134 "mountRootfs" : tryDecode (MountRootfs ),
135- "solo5BlkDev " : tryDecode (solo5BlkDev ),
135+ "blkDev " : tryDecode (blkDev ),
136136 }).WithField ("source" , "spec" ).Debug ("urunc annotations" )
137137
138138 return & UnikernelConfig {
@@ -145,7 +145,7 @@ func getConfigFromSpec(spec *specs.Spec) *UnikernelConfig {
145145 Block : block ,
146146 BlkMntPoint : blkMntPoint ,
147147 MountRootfs : MountRootfs ,
148- Solo5BlkDev : solo5BlkDev ,
148+ BlkDev : blkDev ,
149149 }
150150}
151151
@@ -185,7 +185,7 @@ func getConfigFromJSON(jsonFilePath string) (*UnikernelConfig, error) {
185185 "block" : tryDecode (conf .Block ),
186186 "blkMntPoint" : tryDecode (conf .BlkMntPoint ),
187187 "mountRootfs" : tryDecode (conf .MountRootfs ),
188- "solo5BlkDev " : tryDecode (conf .Solo5BlkDev ),
188+ "blkDev " : tryDecode (conf .BlkDev ),
189189 }).WithField ("source" , uruncJSONFilename ).Debug ("urunc annotations" )
190190
191191 return & conf , nil
@@ -256,11 +256,11 @@ func (c *UnikernelConfig) decode() error {
256256 }
257257 c .MountRootfs = string (decoded )
258258
259- decoded , err = base64 .StdEncoding .DecodeString (c .Solo5BlkDev )
259+ decoded , err = base64 .StdEncoding .DecodeString (c .BlkDev )
260260 if err != nil {
261261 return fmt .Errorf ("failed to decode blkDev: %v" , err )
262262 }
263- c .Solo5BlkDev = string (decoded )
263+ c .BlkDev = string (decoded )
264264
265265 return nil
266266}
@@ -295,8 +295,8 @@ func (c *UnikernelConfig) Map() map[string]string {
295295 if c .MountRootfs != "" {
296296 myMap [annotMountRootfs ] = c .MountRootfs
297297 }
298- if c .Solo5BlkDev != "" {
299- myMap [annotSolo5BlkDev ] = c .Solo5BlkDev
298+ if c .BlkDev != "" {
299+ myMap [annotBlkDev ] = c .BlkDev
300300 }
301301
302302 return myMap
0 commit comments