func requireProject(c *cli.Context, opts options) *project.Project { context := newContext(c, opts) project, err := rancher.NewProject(context) if err != nil { logrus.Fatal(err) } return project }
func (p *ProjectFactory) Create(c *cli.Context) (*project.Project, error) { context := &rancher.Context{ RancherComposeFile: c.GlobalString("rancher-file"), Url: c.GlobalString("url"), AccessKey: c.GlobalString("access-key"), SecretKey: c.GlobalString("secret-key"), } command.Populate(&context.Context, c) return rancher.NewProject(context) }