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
// FakeClient determines if client-gen generates the fake clients.
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
import (
"fmt"
"os"
"path/filepath"
"strings"
@ -153,6 +154,11 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
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{}
for gv, inputDir := range customArgs.GroupVersionToInputPath {
p := context.Universe.Package(inputDir)

View File

@ -74,6 +74,14 @@ func parseInputVersions() (paths []string, groupVersions []unversioned.GroupVers
func main() {
arguments := args.Default()
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{
"k8s.io/kubernetes/pkg/fields",
"k8s.io/kubernetes/pkg/labels",
@ -97,6 +105,7 @@ func main() {
"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/",
false,
false,
cmdArgs,
}
} else {
inputPath, groupVersions, gvToPath, err := parseInputVersions()
@ -119,6 +128,7 @@ func main() {
*clientsetPath,
*clientsetOnly,
*fakeClient,
cmdArgs,
}
}

View File

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

View File

@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -14,5 +14,7 @@ See the License for the specific language governing permissions and
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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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