当前位置: 首页>>代码示例>>Golang>>正文


Golang Command.Name方法代码示例

本文整理汇总了Golang中github.com/cloudfoundry-community/bosh-softlayer-tools/cmds.Command.Name方法的典型用法代码示例。如果您正苦于以下问题:Golang Command.Name方法的具体用法?Golang Command.Name怎么用?Golang Command.Name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在github.com/cloudfoundry-community/bosh-softlayer-tools/cmds.Command的用法示例。


在下文中一共展示了Command.Name方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1:

		cmd = bmp.NewBmsCommand(options, fakeBmpClient)
	})

	Describe("NewBmsCommand", func() {
		It("create new BmsCommand", func() {
			Expect(cmd).ToNot(BeNil())

			cmd2 := bmp.NewBmsCommand(options, fakeBmpClient)
			Expect(cmd2).ToNot(BeNil())
			Expect(cmd2).To(Equal(cmd))
		})
	})

	Describe("#Name", func() {
		It("returns the name of a BmsCommand", func() {
			Expect(cmd.Name()).To(Equal("bms"))
		})
	})

	Describe("#Description", func() {
		It("returns the description of a BmsCommand", func() {
			Expect(cmd.Description()).To(Equal("List all bare metals"))
		})
	})

	Describe("#Usage", func() {
		It("returns the usage text of a BmsCommand", func() {
			Expect(cmd.Usage()).To(Equal("bmp bms --deployment[-d] <deployment file>"))
		})
	})
开发者ID:cloudfoundry-community,项目名称:bosh-softlayer-tools,代码行数:30,代码来源:bms_command_test.go

示例2:

		cmd = bmp.NewProvisioningBaremetalCommand(options, fakeBmpClient)
	})

	Describe("NewProvisioningBaremetalCommand", func() {
		It("create new ProvisioningBaremetalCommand", func() {
			Expect(cmd).ToNot(BeNil())

			cmd2 := bmp.NewProvisioningBaremetalCommand(options, fakeBmpClient)
			Expect(cmd2).ToNot(BeNil())
			Expect(cmd2).To(Equal(cmd))
		})
	})

	Describe("#Name", func() {
		It("returns the name of a ProvisioningBaremetalCommand", func() {
			Expect(cmd.Name()).To(Equal("provisioning-baremetal"))
		})
	})

	Describe("#Description", func() {
		It("returns the description of a ProvisioningBaremetalCommand", func() {
			Expect(cmd.Description()).To(Equal(`provisioning a baremetal with specific stemcell, netboot image`))
		})
	})

	Describe("#Usage", func() {
		It("returns the usage text of a ProvisioningBaremetalCommand", func() {
			Expect(cmd.Usage()).To(Equal("bmp provisioning-baremetal --vmprefix <vm-prefix> --stemcell <bm-stemcell> --netbootimage <bm-netboot-image>"))
		})
	})
开发者ID:cloudfoundry-community,项目名称:bosh-softlayer-tools,代码行数:30,代码来源:provisioning_baremetal_command_test.go

示例3:

		cmd = bmp.NewStemcellsCommand(options, fakeBmpClient)
	})

	Describe("NewStemcellsCommand", func() {
		It("create new StemcellsCommand", func() {
			Expect(cmd).ToNot(BeNil())

			cmd2 := bmp.NewStemcellsCommand(options, fakeBmpClient)
			Expect(cmd2).ToNot(BeNil())
			Expect(cmd2).To(Equal(cmd))
		})
	})

	Describe("#Name", func() {
		It("returns the name of a StemcellsCommand", func() {
			Expect(cmd.Name()).To(Equal("stemcells"))
		})
	})

	Describe("#Description", func() {
		It("returns the description of a StemcellsCommand", func() {
			Expect(cmd.Description()).To(Equal("List all stemcells"))
		})
	})

	Describe("#Usage", func() {
		It("returns the usage text of a StemcellsCommand", func() {
			Expect(cmd.Usage()).To(Equal("bmp stemcells"))
		})
	})
开发者ID:cloudfoundry-community,项目名称:bosh-softlayer-tools,代码行数:30,代码来源:stemcells_command_test.go

示例4:

		cmd = bmp.NewTaskCommand(options, fakeBmpClient)
	})

	Describe("NewTaskCommand", func() {
		It("create new TaskCommand", func() {
			Expect(cmd).ToNot(BeNil())

			cmd2 := bmp.NewTaskCommand(options, fakeBmpClient)
			Expect(cmd2).ToNot(BeNil())
			Expect(cmd2).To(Equal(cmd))
		})
	})

	Describe("#Name", func() {
		It("returns the name of a TaskCommand", func() {
			Expect(cmd.Name()).To(Equal("task"))
		})
	})

	Describe("#Description", func() {
		It("returns the description of a TaskCommand", func() {
			Expect(cmd.Description()).To(Equal(`Show the output of the task: \"option --debug, Get the debug info of the task; --json, show info with JSON format\"`))
		})
	})

	Describe("#Usage", func() {
		It("returns the usage text of a TaskCommand", func() {
			Expect(cmd.Usage()).To(Equal("bmp task <task-id>"))
		})
	})
开发者ID:cloudfoundry-community,项目名称:bosh-softlayer-tools,代码行数:30,代码来源:task_command_test.go

示例5:

		cmd = bmp.NewSlCommand(options, fakeBmpClient)
	})

	Describe("NewSlCommand", func() {
		It("create new SlCommand", func() {
			Expect(cmd).ToNot(BeNil())

			cmd2 := bmp.NewSlCommand(options, fakeBmpClient)
			Expect(cmd2).ToNot(BeNil())
			Expect(cmd2).To(Equal(cmd))
		})
	})

	Describe("#Name", func() {
		It("returns the name of a SlCommand", func() {
			Expect(cmd.Name()).To(Equal("sl"))
		})
	})

	Describe("#Description", func() {
		It("returns the description of a SlCommand", func() {
			Expect(cmd.Description()).To(Equal("List all Softlayer packages or package options"))
		})
	})

	Describe("#Usage", func() {
		It("returns the usage text of a SlCommand", func() {
			Expect(cmd.Usage()).To(Equal("bmp sl --packages | --package-options"))
		})
	})
开发者ID:cloudfoundry-community,项目名称:bosh-softlayer-tools,代码行数:30,代码来源:sl_command_test.go

示例6:

		cmd = bmp.NewCreateBaremetalsCommand(options, fakeBmpClient)
	})

	Describe("NewCreateBaremetalsCommand", func() {
		It("create new CreateBaremetalsCommand", func() {
			Expect(cmd).ToNot(BeNil())

			cmd2 := bmp.NewCreateBaremetalsCommand(options, fakeBmpClient)
			Expect(cmd2).ToNot(BeNil())
			Expect(cmd2).To(Equal(cmd))
		})
	})

	Describe("#Name", func() {
		It("returns the name of a CreateBaremetalsCommand", func() {
			Expect(cmd.Name()).To(Equal("create-baremetals"))
		})
	})

	Describe("#Description", func() {
		It("returns the description of a CreateBaremetalsCommand", func() {
			Expect(cmd.Description()).To(Equal(`Create the missed baremetals: \"option --dryrun, only verify the orders\"`))
		})
	})

	Describe("#Usage", func() {
		It("returns the usage text of a CreateBaremetalsCommand", func() {
			Expect(cmd.Usage()).To(Equal("bmp create-baremetals --deployment[-d] <deployment file> [--dryrun]"))
		})
	})
开发者ID:cloudfoundry-community,项目名称:bosh-softlayer-tools,代码行数:30,代码来源:create_baremetals_command_test.go

示例7:

		cmd = bmp.NewUpdateStateCommand(options, fakeBmpClient)
	})

	Describe("NewUpdateStateCommand", func() {
		It("create new UpdateStateCommand", func() {
			Expect(cmd).ToNot(BeNil())

			cmd2 := bmp.NewUpdateStateCommand(options, fakeBmpClient)
			Expect(cmd2).ToNot(BeNil())
			Expect(cmd2).To(Equal(cmd))
		})
	})

	Describe("#Name", func() {
		It("returns the name of a UpdateStateCommand", func() {
			Expect(cmd.Name()).To(Equal("update-state"))
		})
	})

	Describe("#Description", func() {
		It("returns the description of a UpdateStateCommand", func() {
			Expect(cmd.Description()).To(Equal(`Update the server state (\"bm.state.new\", \"bm.state.using\", \"bm.state.loading\", \"bm.state.failed\", \"bm.state.deleted\")`))
		})
	})

	Describe("#Usage", func() {
		It("returns the usage text of a UpdateStateCommand", func() {
			Expect(cmd.Usage()).To(Equal("bmp update-state --server <server-id> --state <state>"))
		})
	})
开发者ID:cloudfoundry-community,项目名称:bosh-softlayer-tools,代码行数:30,代码来源:update_state_command_test.go

示例8:

		Expect(err).ToNot(HaveOccurred())
	})

	Describe("NewTargetCommand", func() {
		It("create new TargetCommand", func() {
			Expect(cmd).ToNot(BeNil())

			cmd2 := bmp.NewTargetCommand(options, fakeBmpClient)
			Expect(cmd2).ToNot(BeNil())
			Expect(cmd2).To(Equal(cmd))
		})
	})

	Describe("#Name", func() {
		It("returns the name of a TargetCommand", func() {
			Expect(cmd.Name()).To(Equal("target"))
		})
	})

	Describe("#Description", func() {
		It("returns the description of a TargetCommand", func() {
			Expect(cmd.Description()).To(Equal("Set the URL of Bare Metal Provision Server"))
		})
	})

	Describe("#Usage", func() {
		It("returns the usage text of a TargetCommand", func() {
			Expect(cmd.Usage()).To(Equal("bmp target http://url.to.bmp.server"))
		})
	})
开发者ID:cloudfoundry-community,项目名称:bosh-softlayer-tools,代码行数:30,代码来源:target_command_test.go

示例9:

		cmd = bmp.NewStatusCommand(options, fakeBmpClient)
	})

	Describe("NewStatusCommand", func() {
		It("create new StatusCommand", func() {
			Expect(cmd).ToNot(BeNil())

			cmd2 := bmp.NewStatusCommand(options, fakeBmpClient)
			Expect(cmd2).ToNot(BeNil())
			Expect(cmd2).To(Equal(cmd))
		})
	})

	Describe("#Name", func() {
		It("returns the name of a StatusCommand", func() {
			Expect(cmd.Name()).To(Equal("status"))
		})
	})

	Describe("#Description", func() {
		It("returns the description of a StatusCommand", func() {
			Expect(cmd.Description()).To(Equal("show bmp status"))
		})
	})

	Describe("#Usage", func() {
		It("returns the usage text of a StatusCommand", func() {
			Expect(cmd.Usage()).To(Equal("bmp status"))
		})
	})
开发者ID:cloudfoundry-community,项目名称:bosh-softlayer-tools,代码行数:30,代码来源:status_command_test.go

示例10:

		os.RemoveAll(tmpDir)
	})

	Describe("#NewLoginCommand", func() {
		It("create new LoginCommand", func() {
			Expect(cmd).ToNot(BeNil())

			cmd2 := bmp.NewLoginCommand(options, fakeBmpClient)
			Expect(cmd2).ToNot(BeNil())
			Expect(cmd2).To(Equal(cmd))
		})
	})

	Describe("#Name", func() {
		It("returns the name of a LoginCommand", func() {
			Expect(cmd.Name()).To(Equal("login"))
		})
	})

	Describe("#Description", func() {
		It("returns the description of a LoginCommand", func() {
			Expect(cmd.Description()).To(Equal("Login to the Bare Metal Provision Server"))
		})
	})

	Describe("#Usage", func() {
		It("returns the usage text of a LoginCommand", func() {
			Expect(cmd.Usage()).To(Equal("bmp login --username[-u] <username> --password[-p] <password>"))
		})
	})
开发者ID:cloudfoundry-community,项目名称:bosh-softlayer-tools,代码行数:30,代码来源:login_command_test.go


注:本文中的github.com/cloudfoundry-community/bosh-softlayer-tools/cmds.Command.Name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。