This bumps specs to version 93ca97e83c
which fixes the json marshal/unmarshal issue with blkio major/minor and
adds masked and readonly paths to the spec.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2016-04-01 13:00:44 -07:00
parent 89ab7f2ccc
commit 1117a7cbf9
4 changed files with 6 additions and 12481 deletions

4
Godeps/Godeps.json generated
View File

@ -58,8 +58,8 @@
}, },
{ {
"ImportPath": "github.com/opencontainers/specs/specs-go", "ImportPath": "github.com/opencontainers/specs/specs-go",
"Comment": "v0.4.0-27-gcf8ebc9", "Comment": "v0.4.0-35-g93ca97e",
"Rev": "cf8ebc9d6e34a61c6a5dc82d749089ef40184238" "Rev": "93ca97e83ca7fb4fba6d9e30d5470f99ddc02d11"
}, },
{ {
"ImportPath": "github.com/seccomp/libseccomp-golang", "ImportPath": "github.com/seccomp/libseccomp-golang",

View File

@ -136,6 +136,10 @@ type Linux struct {
Seccomp *Seccomp `json:"seccomp,omitempty"` Seccomp *Seccomp `json:"seccomp,omitempty"`
// RootfsPropagation is the rootfs mount propagation mode for the container. // RootfsPropagation is the rootfs mount propagation mode for the container.
RootfsPropagation string `json:"rootfsPropagation,omitempty"` RootfsPropagation string `json:"rootfsPropagation,omitempty"`
// MaskedPaths masks over the provided paths inside the container.
MaskedPaths []string `json:"maskedPaths,omitempty"`
// ReadonlyPaths sets the provided paths as RO inside the container.
ReadonlyPaths []string `json:"readonlyPaths,omitempty"`
} }
// Namespace is the configuration for a Linux namespace // Namespace is the configuration for a Linux namespace

File diff suppressed because it is too large Load Diff

View File

@ -1,351 +0,0 @@
// DO NOT EDIT!
// Code generated by ffjson <https://github.com/pquerna/ffjson>
// source: state.go
// DO NOT EDIT!
package specs
import (
"bytes"
"fmt"
fflib "github.com/pquerna/ffjson/fflib/v1"
)
func (mj *State) MarshalJSON() ([]byte, error) {
var buf fflib.Buffer
if mj == nil {
buf.WriteString("null")
return buf.Bytes(), nil
}
err := mj.MarshalJSONBuf(&buf)
if err != nil {
return nil, err
}
return buf.Bytes(), nil
}
func (mj *State) MarshalJSONBuf(buf fflib.EncodingBuffer) error {
if mj == nil {
buf.WriteString("null")
return nil
}
var err error
var obj []byte
_ = obj
_ = err
buf.WriteString(`{"version":`)
fflib.WriteJsonString(buf, string(mj.Version))
buf.WriteString(`,"id":`)
fflib.WriteJsonString(buf, string(mj.ID))
buf.WriteString(`,"pid":`)
fflib.FormatBits2(buf, uint64(mj.Pid), 10, mj.Pid < 0)
buf.WriteString(`,"bundlePath":`)
fflib.WriteJsonString(buf, string(mj.BundlePath))
buf.WriteByte('}')
return nil
}
const (
ffj_t_Statebase = iota
ffj_t_Stateno_such_key
ffj_t_State_Version
ffj_t_State_ID
ffj_t_State_Pid
ffj_t_State_BundlePath
)
var ffj_key_State_Version = []byte("version")
var ffj_key_State_ID = []byte("id")
var ffj_key_State_Pid = []byte("pid")
var ffj_key_State_BundlePath = []byte("bundlePath")
func (uj *State) UnmarshalJSON(input []byte) error {
fs := fflib.NewFFLexer(input)
return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start)
}
func (uj *State) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error {
var err error = nil
currentKey := ffj_t_Statebase
_ = currentKey
tok := fflib.FFTok_init
wantedTok := fflib.FFTok_init
mainparse:
for {
tok = fs.Scan()
// println(fmt.Sprintf("debug: tok: %v state: %v", tok, state))
if tok == fflib.FFTok_error {
goto tokerror
}
switch state {
case fflib.FFParse_map_start:
if tok != fflib.FFTok_left_bracket {
wantedTok = fflib.FFTok_left_bracket
goto wrongtokenerror
}
state = fflib.FFParse_want_key
continue
case fflib.FFParse_after_value:
if tok == fflib.FFTok_comma {
state = fflib.FFParse_want_key
} else if tok == fflib.FFTok_right_bracket {
goto done
} else {
wantedTok = fflib.FFTok_comma
goto wrongtokenerror
}
case fflib.FFParse_want_key:
// json {} ended. goto exit. woo.
if tok == fflib.FFTok_right_bracket {
goto done
}
if tok != fflib.FFTok_string {
wantedTok = fflib.FFTok_string
goto wrongtokenerror
}
kn := fs.Output.Bytes()
if len(kn) <= 0 {
// "" case. hrm.
currentKey = ffj_t_Stateno_such_key
state = fflib.FFParse_want_colon
goto mainparse
} else {
switch kn[0] {
case 'b':
if bytes.Equal(ffj_key_State_BundlePath, kn) {
currentKey = ffj_t_State_BundlePath
state = fflib.FFParse_want_colon
goto mainparse
}
case 'i':
if bytes.Equal(ffj_key_State_ID, kn) {
currentKey = ffj_t_State_ID
state = fflib.FFParse_want_colon
goto mainparse
}
case 'p':
if bytes.Equal(ffj_key_State_Pid, kn) {
currentKey = ffj_t_State_Pid
state = fflib.FFParse_want_colon
goto mainparse
}
case 'v':
if bytes.Equal(ffj_key_State_Version, kn) {
currentKey = ffj_t_State_Version
state = fflib.FFParse_want_colon
goto mainparse
}
}
if fflib.SimpleLetterEqualFold(ffj_key_State_BundlePath, kn) {
currentKey = ffj_t_State_BundlePath
state = fflib.FFParse_want_colon
goto mainparse
}
if fflib.SimpleLetterEqualFold(ffj_key_State_Pid, kn) {
currentKey = ffj_t_State_Pid
state = fflib.FFParse_want_colon
goto mainparse
}
if fflib.SimpleLetterEqualFold(ffj_key_State_ID, kn) {
currentKey = ffj_t_State_ID
state = fflib.FFParse_want_colon
goto mainparse
}
if fflib.EqualFoldRight(ffj_key_State_Version, kn) {
currentKey = ffj_t_State_Version
state = fflib.FFParse_want_colon
goto mainparse
}
currentKey = ffj_t_Stateno_such_key
state = fflib.FFParse_want_colon
goto mainparse
}
case fflib.FFParse_want_colon:
if tok != fflib.FFTok_colon {
wantedTok = fflib.FFTok_colon
goto wrongtokenerror
}
state = fflib.FFParse_want_value
continue
case fflib.FFParse_want_value:
if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null {
switch currentKey {
case ffj_t_State_Version:
goto handle_Version
case ffj_t_State_ID:
goto handle_ID
case ffj_t_State_Pid:
goto handle_Pid
case ffj_t_State_BundlePath:
goto handle_BundlePath
case ffj_t_Stateno_such_key:
err = fs.SkipField(tok)
if err != nil {
return fs.WrapErr(err)
}
state = fflib.FFParse_after_value
goto mainparse
}
} else {
goto wantedvalue
}
}
}
handle_Version:
/* handler: uj.Version type=string kind=string quoted=false*/
{
{
if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
}
}
if tok == fflib.FFTok_null {
} else {
outBuf := fs.Output.Bytes()
uj.Version = string(string(outBuf))
}
}
state = fflib.FFParse_after_value
goto mainparse
handle_ID:
/* handler: uj.ID type=string kind=string quoted=false*/
{
{
if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
}
}
if tok == fflib.FFTok_null {
} else {
outBuf := fs.Output.Bytes()
uj.ID = string(string(outBuf))
}
}
state = fflib.FFParse_after_value
goto mainparse
handle_Pid:
/* handler: uj.Pid type=int kind=int quoted=false*/
{
if tok != fflib.FFTok_integer && tok != fflib.FFTok_null {
return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int", tok))
}
}
{
if tok == fflib.FFTok_null {
} else {
tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64)
if err != nil {
return fs.WrapErr(err)
}
uj.Pid = int(tval)
}
}
state = fflib.FFParse_after_value
goto mainparse
handle_BundlePath:
/* handler: uj.BundlePath type=string kind=string quoted=false*/
{
{
if tok != fflib.FFTok_string && tok != fflib.FFTok_null {
return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok))
}
}
if tok == fflib.FFTok_null {
} else {
outBuf := fs.Output.Bytes()
uj.BundlePath = string(string(outBuf))
}
}
state = fflib.FFParse_after_value
goto mainparse
wantedvalue:
return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok))
wrongtokenerror:
return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String()))
tokerror:
if fs.BigError != nil {
return fs.WrapErr(fs.BigError)
}
err = fs.Error.ToError()
if err != nil {
return fs.WrapErr(err)
}
panic("ffjson-generated: unreachable, please report bug.")
done:
return nil
}