Documentation ¶
Index ¶
- func BmsClientBuilder() *http_client.HcHttpClientBuilder
- func GenReqDefForAttachBaremetalServerVolume() *def.HttpRequestDef
- func GenReqDefForBatchCreateBaremetalServerTags() *def.HttpRequestDef
- func GenReqDefForBatchDeleteBaremetalServerTags() *def.HttpRequestDef
- func GenReqDefForBatchRebootBaremetalServers() *def.HttpRequestDef
- func GenReqDefForBatchStartBaremetalServers() *def.HttpRequestDef
- func GenReqDefForBatchStopBaremetalServers() *def.HttpRequestDef
- func GenReqDefForChangeBaremetalServerName() *def.HttpRequestDef
- func GenReqDefForCreateBareMetalServers() *def.HttpRequestDef
- func GenReqDefForDeleteWindowsBareMetalServerPassword() *def.HttpRequestDef
- func GenReqDefForDetachBaremetalServerVolume() *def.HttpRequestDef
- func GenReqDefForListBareMetalServerDetails() *def.HttpRequestDef
- func GenReqDefForListBareMetalServers() *def.HttpRequestDef
- func GenReqDefForListBaremetalFlavorDetailExtends() *def.HttpRequestDef
- func GenReqDefForReinstallBaremetalServerOs() *def.HttpRequestDef
- func GenReqDefForResetPwdOneClick() *def.HttpRequestDef
- func GenReqDefForShowBaremetalServerInterfaceAttachments() *def.HttpRequestDef
- func GenReqDefForShowBaremetalServerTags() *def.HttpRequestDef
- func GenReqDefForShowBaremetalServerVolumeInfo() *def.HttpRequestDef
- func GenReqDefForShowJobInfos() *def.HttpRequestDef
- func GenReqDefForShowResetPwd() *def.HttpRequestDef
- func GenReqDefForShowSpecifiedVersion() *def.HttpRequestDef
- func GenReqDefForShowTenantQuota() *def.HttpRequestDef
- func GenReqDefForShowWindowsBaremetalServerPwd() *def.HttpRequestDef
- func GenReqDefForUpdateBaremetalServerMetadata() *def.HttpRequestDef
- type BmsClient
- func (c *BmsClient) AttachBaremetalServerVolume(request *model.AttachBaremetalServerVolumeRequest) (*model.AttachBaremetalServerVolumeResponse, error)
- func (c *BmsClient) BatchCreateBaremetalServerTags(request *model.BatchCreateBaremetalServerTagsRequest) (*model.BatchCreateBaremetalServerTagsResponse, error)
- func (c *BmsClient) BatchDeleteBaremetalServerTags(request *model.BatchDeleteBaremetalServerTagsRequest) (*model.BatchDeleteBaremetalServerTagsResponse, error)
- func (c *BmsClient) BatchRebootBaremetalServers(request *model.BatchRebootBaremetalServersRequest) (*model.BatchRebootBaremetalServersResponse, error)
- func (c *BmsClient) BatchStartBaremetalServers(request *model.BatchStartBaremetalServersRequest) (*model.BatchStartBaremetalServersResponse, error)
- func (c *BmsClient) BatchStopBaremetalServers(request *model.BatchStopBaremetalServersRequest) (*model.BatchStopBaremetalServersResponse, error)
- func (c *BmsClient) ChangeBaremetalServerName(request *model.ChangeBaremetalServerNameRequest) (*model.ChangeBaremetalServerNameResponse, error)
- func (c *BmsClient) CreateBareMetalServers(request *model.CreateBareMetalServersRequest) (*model.CreateBareMetalServersResponse, error)
- func (c *BmsClient) DeleteWindowsBareMetalServerPassword(request *model.DeleteWindowsBareMetalServerPasswordRequest) (*model.DeleteWindowsBareMetalServerPasswordResponse, error)
- func (c *BmsClient) DetachBaremetalServerVolume(request *model.DetachBaremetalServerVolumeRequest) (*model.DetachBaremetalServerVolumeResponse, error)
- func (c *BmsClient) ListBareMetalServerDetails(request *model.ListBareMetalServerDetailsRequest) (*model.ListBareMetalServerDetailsResponse, error)
- func (c *BmsClient) ListBareMetalServers(request *model.ListBareMetalServersRequest) (*model.ListBareMetalServersResponse, error)
- func (c *BmsClient) ListBaremetalFlavorDetailExtends(request *model.ListBaremetalFlavorDetailExtendsRequest) (*model.ListBaremetalFlavorDetailExtendsResponse, error)
- func (c *BmsClient) ReinstallBaremetalServerOs(request *model.ReinstallBaremetalServerOsRequest) (*model.ReinstallBaremetalServerOsResponse, error)
- func (c *BmsClient) ResetPwdOneClick(request *model.ResetPwdOneClickRequest) (*model.ResetPwdOneClickResponse, error)
- func (c *BmsClient) ShowBaremetalServerInterfaceAttachments(request *model.ShowBaremetalServerInterfaceAttachmentsRequest) (*model.ShowBaremetalServerInterfaceAttachmentsResponse, error)
- func (c *BmsClient) ShowBaremetalServerTags(request *model.ShowBaremetalServerTagsRequest) (*model.ShowBaremetalServerTagsResponse, error)
- func (c *BmsClient) ShowBaremetalServerVolumeInfo(request *model.ShowBaremetalServerVolumeInfoRequest) (*model.ShowBaremetalServerVolumeInfoResponse, error)
- func (c *BmsClient) ShowJobInfos(request *model.ShowJobInfosRequest) (*model.ShowJobInfosResponse, error)
- func (c *BmsClient) ShowResetPwd(request *model.ShowResetPwdRequest) (*model.ShowResetPwdResponse, error)
- func (c *BmsClient) ShowSpecifiedVersion(request *model.ShowSpecifiedVersionRequest) (*model.ShowSpecifiedVersionResponse, error)
- func (c *BmsClient) ShowTenantQuota(request *model.ShowTenantQuotaRequest) (*model.ShowTenantQuotaResponse, error)
- func (c *BmsClient) ShowWindowsBaremetalServerPwd(request *model.ShowWindowsBaremetalServerPwdRequest) (*model.ShowWindowsBaremetalServerPwdResponse, error)
- func (c *BmsClient) UpdateBaremetalServerMetadata(request *model.UpdateBaremetalServerMetadataRequest) (*model.UpdateBaremetalServerMetadataResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BmsClientBuilder ¶
func BmsClientBuilder() *http_client.HcHttpClientBuilder
func GenReqDefForAttachBaremetalServerVolume ¶
func GenReqDefForAttachBaremetalServerVolume() *def.HttpRequestDef
func GenReqDefForBatchCreateBaremetalServerTags ¶
func GenReqDefForBatchCreateBaremetalServerTags() *def.HttpRequestDef
func GenReqDefForBatchDeleteBaremetalServerTags ¶
func GenReqDefForBatchDeleteBaremetalServerTags() *def.HttpRequestDef
func GenReqDefForBatchRebootBaremetalServers ¶
func GenReqDefForBatchRebootBaremetalServers() *def.HttpRequestDef
func GenReqDefForBatchStartBaremetalServers ¶
func GenReqDefForBatchStartBaremetalServers() *def.HttpRequestDef
func GenReqDefForBatchStopBaremetalServers ¶
func GenReqDefForBatchStopBaremetalServers() *def.HttpRequestDef
func GenReqDefForChangeBaremetalServerName ¶
func GenReqDefForChangeBaremetalServerName() *def.HttpRequestDef
func GenReqDefForCreateBareMetalServers ¶
func GenReqDefForCreateBareMetalServers() *def.HttpRequestDef
func GenReqDefForDeleteWindowsBareMetalServerPassword ¶
func GenReqDefForDeleteWindowsBareMetalServerPassword() *def.HttpRequestDef
func GenReqDefForDetachBaremetalServerVolume ¶
func GenReqDefForDetachBaremetalServerVolume() *def.HttpRequestDef
func GenReqDefForListBareMetalServerDetails ¶
func GenReqDefForListBareMetalServerDetails() *def.HttpRequestDef
func GenReqDefForListBareMetalServers ¶
func GenReqDefForListBareMetalServers() *def.HttpRequestDef
func GenReqDefForListBaremetalFlavorDetailExtends ¶
func GenReqDefForListBaremetalFlavorDetailExtends() *def.HttpRequestDef
func GenReqDefForReinstallBaremetalServerOs ¶
func GenReqDefForReinstallBaremetalServerOs() *def.HttpRequestDef
func GenReqDefForResetPwdOneClick ¶
func GenReqDefForResetPwdOneClick() *def.HttpRequestDef
func GenReqDefForShowBaremetalServerInterfaceAttachments ¶
func GenReqDefForShowBaremetalServerInterfaceAttachments() *def.HttpRequestDef
func GenReqDefForShowBaremetalServerTags ¶
func GenReqDefForShowBaremetalServerTags() *def.HttpRequestDef
func GenReqDefForShowBaremetalServerVolumeInfo ¶
func GenReqDefForShowBaremetalServerVolumeInfo() *def.HttpRequestDef
func GenReqDefForShowJobInfos ¶
func GenReqDefForShowJobInfos() *def.HttpRequestDef
func GenReqDefForShowResetPwd ¶
func GenReqDefForShowResetPwd() *def.HttpRequestDef
func GenReqDefForShowSpecifiedVersion ¶
func GenReqDefForShowSpecifiedVersion() *def.HttpRequestDef
func GenReqDefForShowTenantQuota ¶
func GenReqDefForShowTenantQuota() *def.HttpRequestDef
func GenReqDefForShowWindowsBaremetalServerPwd ¶
func GenReqDefForShowWindowsBaremetalServerPwd() *def.HttpRequestDef
func GenReqDefForUpdateBaremetalServerMetadata ¶
func GenReqDefForUpdateBaremetalServerMetadata() *def.HttpRequestDef
Types ¶
type BmsClient ¶
type BmsClient struct {
HcClient *http_client.HcHttpClient
}
func NewBmsClient ¶
func NewBmsClient(hcClient *http_client.HcHttpClient) *BmsClient
func (*BmsClient) AttachBaremetalServerVolume ¶
func (c *BmsClient) AttachBaremetalServerVolume(request *model.AttachBaremetalServerVolumeRequest) (*model.AttachBaremetalServerVolumeResponse, error)
裸金属服务器创建成功后,如果发现磁盘不够用或者当前磁盘不满足要求,可以将已有云硬盘挂载给裸金属服务器,作为数据盘使用
func (*BmsClient) BatchCreateBaremetalServerTags ¶
func (c *BmsClient) BatchCreateBaremetalServerTags(request *model.BatchCreateBaremetalServerTagsRequest) (*model.BatchCreateBaremetalServerTagsResponse, error)
- 为指定裸金属服务器批量添加标签。
func (*BmsClient) BatchDeleteBaremetalServerTags ¶
func (c *BmsClient) BatchDeleteBaremetalServerTags(request *model.BatchDeleteBaremetalServerTagsRequest) (*model.BatchDeleteBaremetalServerTagsResponse, error)
- 为指定云服务器批量删除标签。
func (*BmsClient) BatchRebootBaremetalServers ¶
func (c *BmsClient) BatchRebootBaremetalServers(request *model.BatchRebootBaremetalServersRequest) (*model.BatchRebootBaremetalServersResponse, error)
根据给定的裸金属服务器ID列表,批量重启裸金属服务器
func (*BmsClient) BatchStartBaremetalServers ¶
func (c *BmsClient) BatchStartBaremetalServers(request *model.BatchStartBaremetalServersRequest) (*model.BatchStartBaremetalServersResponse, error)
根据给定的裸金属服务器ID列表,批量启动裸金属服务器
func (*BmsClient) BatchStopBaremetalServers ¶
func (c *BmsClient) BatchStopBaremetalServers(request *model.BatchStopBaremetalServersRequest) (*model.BatchStopBaremetalServersResponse, error)
根据给定的裸金属服务器ID列表,批量关闭裸金属服务器
func (*BmsClient) ChangeBaremetalServerName ¶
func (c *BmsClient) ChangeBaremetalServerName(request *model.ChangeBaremetalServerNameRequest) (*model.ChangeBaremetalServerNameResponse, error)
修改裸金属服务器名称
func (*BmsClient) CreateBareMetalServers ¶
func (c *BmsClient) CreateBareMetalServers(request *model.CreateBareMetalServersRequest) (*model.CreateBareMetalServersResponse, error)
创建一台或多台裸金属服务器,裸金属服务器的登录鉴权方式包括两种:密钥对、密码。为安全起见,推荐使用密钥对方式
func (*BmsClient) DeleteWindowsBareMetalServerPassword ¶
func (c *BmsClient) DeleteWindowsBareMetalServerPassword(request *model.DeleteWindowsBareMetalServerPasswordRequest) (*model.DeleteWindowsBareMetalServerPasswordResponse, error)
清除Windows裸金属服务器初始安装时系统生成的密码记录。清除密码后,不影响裸金属服务器密码登录功能,但不能再使用获取密码功能来查询该裸金属服务器密码。如果裸金属服务器是通过私有镜像创建的,请确保已安装Cloudbase-init。公共镜像默认已安装该软件
func (*BmsClient) DetachBaremetalServerVolume ¶
func (c *BmsClient) DetachBaremetalServerVolume(request *model.DetachBaremetalServerVolumeRequest) (*model.DetachBaremetalServerVolumeResponse, error)
将挂载至裸金属服务器中的磁盘卸载;对于挂载在系统盘盘位(也就是“/dev/sda”挂载点)上的磁盘,不允许执行卸载操作;对于挂载在数据盘盘位(非“/dev/sda”挂载点)上的磁盘,支持离线卸载和在线卸载(裸金属服务器处于“运行中”状态)磁盘
func (*BmsClient) ListBareMetalServerDetails ¶
func (c *BmsClient) ListBareMetalServerDetails(request *model.ListBareMetalServerDetailsRequest) (*model.ListBareMetalServerDetailsResponse, error)
获取裸金属服务器详细信息,该接口支持查询裸金属服务器的计费方式,以及是否被冻结
func (*BmsClient) ListBareMetalServers ¶
func (c *BmsClient) ListBareMetalServers(request *model.ListBareMetalServersRequest) (*model.ListBareMetalServersResponse, error)
用户根据设置的请求条件筛选裸金属服务器,并获取裸金属服务器的详细信息。该接口支持查询裸金属服务器计费方式,以及是否被冻结。
func (*BmsClient) ListBaremetalFlavorDetailExtends ¶
func (c *BmsClient) ListBaremetalFlavorDetailExtends(request *model.ListBaremetalFlavorDetailExtendsRequest) (*model.ListBaremetalFlavorDetailExtendsResponse, error)
查询裸金属服务器的规格详情和规格的扩展信息。您可以调用此接口查询“baremetal:extBootType”参数取值,以确认某个规格是否支持快速发放
func (*BmsClient) ReinstallBaremetalServerOs ¶
func (c *BmsClient) ReinstallBaremetalServerOs(request *model.ReinstallBaremetalServerOsRequest) (*model.ReinstallBaremetalServerOsResponse, error)
重装裸金属服务器的操作系统。快速发放裸金属服务器支持裸金属服务器数据盘不变的情况下,使用原镜像重装系统盘。重装操作系统支持密码或者密钥注入
func (*BmsClient) ResetPwdOneClick ¶
func (c *BmsClient) ResetPwdOneClick(request *model.ResetPwdOneClickRequest) (*model.ResetPwdOneClickResponse, error)
在裸金属服务器支持一键重置密码功能的前提下,重置裸金属服务器管理帐号(root用户或Administrator用户)的密码。可以通过6.10.1-查询是否支持一键重置密码API查询是否支持一键重置密码。
func (*BmsClient) ShowBaremetalServerInterfaceAttachments ¶
func (c *BmsClient) ShowBaremetalServerInterfaceAttachments(request *model.ShowBaremetalServerInterfaceAttachmentsRequest) (*model.ShowBaremetalServerInterfaceAttachmentsResponse, error)
查询裸金属服务器的网卡信息,比如网卡的IP地址、MAC地址
func (*BmsClient) ShowBaremetalServerTags ¶
func (c *BmsClient) ShowBaremetalServerTags(request *model.ShowBaremetalServerTagsRequest) (*model.ShowBaremetalServerTagsResponse, error)
- 查询指定云服务器的标签信息。
func (*BmsClient) ShowBaremetalServerVolumeInfo ¶
func (c *BmsClient) ShowBaremetalServerVolumeInfo(request *model.ShowBaremetalServerVolumeInfoRequest) (*model.ShowBaremetalServerVolumeInfoResponse, error)
查询裸金属服务器挂载的磁盘信息
func (*BmsClient) ShowJobInfos ¶
func (c *BmsClient) ShowJobInfos(request *model.ShowJobInfosRequest) (*model.ShowJobInfosResponse, error)
查询Job的执行状态。对于创建裸金属服务器物理机、挂卸卷等异步API,命令下发后,会返回job_id,通过job_id可以查询任务的执行状态
func (*BmsClient) ShowResetPwd ¶
func (c *BmsClient) ShowResetPwd(request *model.ShowResetPwdRequest) (*model.ShowResetPwdResponse, error)
查询是否支持一键重置密码
func (*BmsClient) ShowSpecifiedVersion ¶
func (c *BmsClient) ShowSpecifiedVersion(request *model.ShowSpecifiedVersionRequest) (*model.ShowSpecifiedVersionResponse, error)
查询裸金属服务指定接口版本的信息
func (*BmsClient) ShowTenantQuota ¶
func (c *BmsClient) ShowTenantQuota(request *model.ShowTenantQuotaRequest) (*model.ShowTenantQuotaResponse, error)
查询该租户下,所有资源的配额信息,包括已使用配额
func (*BmsClient) ShowWindowsBaremetalServerPwd ¶
func (c *BmsClient) ShowWindowsBaremetalServerPwd(request *model.ShowWindowsBaremetalServerPwdRequest) (*model.ShowWindowsBaremetalServerPwdResponse, error)
获取Windows裸金属服务器初始安装时系统生成的管理员帐户(Administrator帐户或Cloudbase-init设置的帐户)随机密码。如果裸金属服务器是通过私有镜像创建的,请确保已安装Cloudbase-init。公共镜像默认已安装该软件
func (*BmsClient) UpdateBaremetalServerMetadata ¶
func (c *BmsClient) UpdateBaremetalServerMetadata(request *model.UpdateBaremetalServerMetadataRequest) (*model.UpdateBaremetalServerMetadataResponse, error)
更新裸金属服务器元数据。如果元数据中没有待更新字段,则自动添加该字段。如果元数据中已存在待更新字段,则直接更新字段值;如果元数据中的字段不再请求参数中,则保持不变