Fill in Default Values for CPU/Memory (#130)
Update k8s client and the dependencies ACI client change for Mocking Add ACI Provider Mock Tests Add the Windows development environment Add UT for Default Resource Requests Enable the make test in Docker file Update the vendors
This commit is contained in:
2
vendor/k8s.io/client-go/util/jsonpath/BUILD
generated
vendored
2
vendor/k8s.io/client-go/util/jsonpath/BUILD
generated
vendored
@@ -12,6 +12,7 @@ go_test(
|
||||
"jsonpath_test.go",
|
||||
"parser_test.go",
|
||||
],
|
||||
importpath = "k8s.io/client-go/util/jsonpath",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
@@ -23,6 +24,7 @@ go_library(
|
||||
"node.go",
|
||||
"parser.go",
|
||||
],
|
||||
importpath = "k8s.io/client-go/util/jsonpath",
|
||||
deps = ["//vendor/k8s.io/client-go/third_party/forked/golang/template:go_default_library"],
|
||||
)
|
||||
|
||||
|
||||
12
vendor/k8s.io/client-go/util/jsonpath/parser.go
generated
vendored
12
vendor/k8s.io/client-go/util/jsonpath/parser.go
generated
vendored
@@ -43,7 +43,11 @@ type Parser struct {
|
||||
width int
|
||||
}
|
||||
|
||||
var ErrSyntax = errors.New("invalid syntax")
|
||||
var (
|
||||
ErrSyntax = errors.New("invalid syntax")
|
||||
dictKeyRex = regexp.MustCompile(`^'([^']*)'$`)
|
||||
sliceOperatorRex = regexp.MustCompile(`^(-?[\d]*)(:-?[\d]*)?(:[\d]*)?$`)
|
||||
)
|
||||
|
||||
// Parse parsed the given text and return a node Parser.
|
||||
// If an error is encountered, parsing stops and an empty
|
||||
@@ -283,8 +287,7 @@ Loop:
|
||||
}
|
||||
|
||||
// dict key
|
||||
reg := regexp.MustCompile(`^'([^']*)'$`)
|
||||
value := reg.FindStringSubmatch(text)
|
||||
value := dictKeyRex.FindStringSubmatch(text)
|
||||
if value != nil {
|
||||
parser, err := parseAction("arraydict", fmt.Sprintf(".%s", value[1]))
|
||||
if err != nil {
|
||||
@@ -297,8 +300,7 @@ Loop:
|
||||
}
|
||||
|
||||
//slice operator
|
||||
reg = regexp.MustCompile(`^(-?[\d]*)(:-?[\d]*)?(:[\d]*)?$`)
|
||||
value = reg.FindStringSubmatch(text)
|
||||
value = sliceOperatorRex.FindStringSubmatch(text)
|
||||
if value == nil {
|
||||
return fmt.Errorf("invalid array index %s", text)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user