Merge pull request #22928 from caesarxuchao/print-client-gen-command

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2016-03-16 00:38:39 -07:00
commit 460ece34d5
65 changed files with 142 additions and 0 deletions

View File

@ -41,4 +41,6 @@ type Args struct {
ClientsetOnly bool ClientsetOnly bool
// FakeClient determines if client-gen generates the fake clients. // FakeClient determines if client-gen generates the fake clients.
FakeClient bool FakeClient bool
// CmdArgs is the command line arguments supplied when the client-gen is called.
CmdArgs string
} }

View File

@ -18,6 +18,7 @@ limitations under the License.
package generators package generators
import ( import (
"fmt"
"os" "os"
"path/filepath" "path/filepath"
"strings" "strings"
@ -153,6 +154,11 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
glog.Fatalf("cannot convert arguments.CustomArgs to clientgenargs.Args") glog.Fatalf("cannot convert arguments.CustomArgs to clientgenargs.Args")
} }
if len(customArgs.CmdArgs) != 0 {
boilerplate = append(boilerplate, []byte(fmt.Sprintf("\n// This file is generated by client-gen with arguments: %s\n\n", customArgs.CmdArgs))...)
} else {
boilerplate = append(boilerplate, []byte(fmt.Sprintf("\n// This file is generated by client-gen with the default arguments.\n\n"))...)
}
gvToTypes := map[unversioned.GroupVersion][]*types.Type{} gvToTypes := map[unversioned.GroupVersion][]*types.Type{}
for gv, inputDir := range customArgs.GroupVersionToInputPath { for gv, inputDir := range customArgs.GroupVersionToInputPath {
p := context.Universe.Package(inputDir) p := context.Universe.Package(inputDir)

View File

@ -74,6 +74,14 @@ func parseInputVersions() (paths []string, groupVersions []unversioned.GroupVers
func main() { func main() {
arguments := args.Default() arguments := args.Default()
flag.Parse() flag.Parse()
var cmdArgs string
flag.VisitAll(func(f *flag.Flag) {
if !f.Changed || f.Name == "verify-only" {
return
}
cmdArgs = cmdArgs + fmt.Sprintf("--%s=%s ", f.Name, f.Value)
})
dependencies := []string{ dependencies := []string{
"k8s.io/kubernetes/pkg/fields", "k8s.io/kubernetes/pkg/fields",
"k8s.io/kubernetes/pkg/labels", "k8s.io/kubernetes/pkg/labels",
@ -97,6 +105,7 @@ func main() {
"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/", "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/",
false, false,
false, false,
cmdArgs,
} }
} else { } else {
inputPath, groupVersions, gvToPath, err := parseInputVersions() inputPath, groupVersions, gvToPath, err := parseInputVersions()
@ -119,6 +128,7 @@ func main() {
*clientsetPath, *clientsetPath,
*clientsetOnly, *clientsetOnly,
*fakeClient, *fakeClient,
cmdArgs,
} }
} }

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with arguments: --test=true
package test_internalclientset package test_internalclientset
import ( import (

View File

@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with arguments: --test=true
// Package unversioned has the automatically generated clients for unversioned resources. // Package unversioned has the automatically generated clients for unversioned resources.
package unversioned package unversioned

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with arguments: --test=true
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with arguments: --test=true
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package internalclientset package internalclientset
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
// Package unversioned has the automatically generated clients for unversioned resources. // Package unversioned has the automatically generated clients for unversioned resources.
package unversioned package unversioned

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
// Package fake has the automatically generated clients. // Package fake has the automatically generated clients.
package fake package fake

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
// Package unversioned has the automatically generated clients for unversioned resources. // Package unversioned has the automatically generated clients for unversioned resources.
package unversioned package unversioned

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
// Package fake has the automatically generated clients. // Package fake has the automatically generated clients.
package fake package fake

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
// FakeScales implements ScaleInterface // FakeScales implements ScaleInterface

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package fake package fake
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
// ScalesGetter has a method to return a ScaleInterface. // ScalesGetter has a method to return a ScaleInterface.

View File

@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This file is generated by client-gen with the default arguments.
package unversioned package unversioned
import ( import (