Documentation ¶
Index ¶
- func AddHardware(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func AddLocation(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func AddManageNetwork(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func AddNetwork(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func AddOsConfig(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func AddSystemConfig(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func AddTaskInfo(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func AddUser(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func AddVmDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchAddDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchAssignManufacturerOnwer(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchCancelInstall(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchDelete(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchDeleteScanDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchDeleteVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchPowerOff(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchPowerOn(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchReInstall(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchReInstallVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchReStart(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchReStartVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchStartFromPxe(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchStartVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchStopVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func BatchUpdateDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func CheckOnlineUpdate(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func CloudBootCron(conf *config.Config, logger logger.Logger, repo model.Repo)
- func CollectAndUpdateVmHostResource(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func CreateNewMacAddress(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func CreatePxeFile(ctx context.Context, mac string) error
- func DBVersionUpdate(conf *config.Config, logger logger.Logger, repo model.Repo)
- func DeleteHardwareById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func DeleteLocationById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func DeleteManageNetworkById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func DeleteNetworkById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func DeleteOsConfigById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func DeleteSystemConfigById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func DeleteTaskInfoByID(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func DeleteUserById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func DeleteVmDeviceById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ExportDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ExportHardware(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ExportScanDeviceList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func FormatLocationToTreeByPid(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetCidrInfoByNetwork(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetCompanyByGroup(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetDeviceById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetDeviceBySn(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetDeviceInstallCallbackList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetDeviceInstallReport(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetDeviceList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetDeviceLogByDeviceIdAndType(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetDeviceNumByStatus(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetDevicePrepareInstallInfo(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetDhcpSubnetList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetFullDeviceById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetFullVmDeviceById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetHardwareById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetHardwareBySn(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetHardwareList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetLocationById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetLocationList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetLocationListByPid(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetLocationTreeNameById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetManageNetworkById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetManageNetworkList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetModelNameByWhereAndGroup(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetNetworkById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetNetworkBySn(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetNetworkBySnForVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetNetworkList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetNotUsedIPListByNetworkId(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetOsConfigById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetOsConfigList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetPlatformConfigByName(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetProductByWhereAndGroup(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetScanDeviceByDeviceId(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetScanDeviceById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetScanDeviceCompany(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetScanDeviceList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetScanDeviceModelName(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetScanDeviceProduct(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetSession(w rest.ResponseWriter, r *rest.Request) (model.UserWithToken, error)
- func GetSystemBySn(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetSystemBySnForVm(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetSystemConfigById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetSystemConfigList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetTaskInfoPage(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetTaskResultPage(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetUserById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetUserList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetVmDeviceById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetVmDeviceList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetVmDeviceListByHostSn(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetVmDeviceLogByDeviceIdAndType(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetVmHostBySn(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func GetVmHostList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ImportDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ImportDeviceForOpenApi(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ImportPriview(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func InitBootOSIPForScanDeviceListProcess(logger logger.Logger, repo model.Repo)
- func InstallTimeoutProcess(conf *config.Config, logger logger.Logger, repo model.Repo)
- func IsInPreInstallList(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func IsInPreInstallListForVm(ctx context.Context, w rest.ResponseWriter, mac string)
- func Login(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func LoginOut(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ReceiveCallback(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ReportDeviceInstallReport(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ReportInstallInfo(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ReportInstallInfoForVm(ctx context.Context, w rest.ResponseWriter, mac string, title string, ...)
- func ReportMacInfo(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ReportProductInfo(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func RunCreateVm(ctx context.Context, vmDeviceId uint) error
- func RunCreateVmNoVncTokenFile(repo model.Repo, logger logger.Logger, vmDeviceId uint) error
- func RunCreateVol(ctx context.Context, vmDeviceId uint) error
- func RunDeleteVmNoVncTokenFile(repo model.Repo, logger logger.Logger, vmDeviceId uint) error
- func RunDestroyVm(ctx context.Context, vmDeviceId uint) error
- func RunDestroyVol(ctx context.Context, vmDeviceId uint) error
- func RunGetVmHostInfo(repo model.Repo, logger logger.Logger, deviceId uint) (string, error)
- func RunGetVmHostPoolInfo(repo model.Repo, logger logger.Logger, conf *config.Config, deviceId uint) (string, error)
- func RunGetVmInfo(repo model.Repo, logger logger.Logger, vmDeviceId uint) (string, error)
- func RunOnlineUpdate(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func RunReStartVm(ctx context.Context, vmDeviceId uint) error
- func RunStartVm(ctx context.Context, vmDeviceId uint) error
- func RunStopVm(ctx context.Context, vmDeviceId uint) error
- func RunTestConnectVmHost(repo model.Repo, logger logger.Logger, deviceId uint) (string, error)
- func SaveDeviceInstallCallback(ctx context.Context, deviceId uint, callbackType string, content string) error
- func SaveDhcpSubnet(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func SavePlatformConfig(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func UpdateHardwareById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func UpdateLocationById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func UpdateManageNetworkById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func UpdateMyInfo(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func UpdateNetworkById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func UpdateOsConfigById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func UpdateSystemConfigById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func UpdateUserById(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func UpdateVmHostResource(logger logger.Logger, repo model.Repo, conf *config.Config, deviceId uint)
- func UploadCompanyHardware(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func UploadDevice(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func UploadFile(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func UploadHardware(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func UploadScript(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ValidateIp(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ValidateMac(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ValidateManageIp(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func ValidateSn(ctx context.Context, w rest.ResponseWriter, r *rest.Request)
- func VerifyAccessPurview(token string, ctx context.Context, isVerifyAdministratorRole bool, ...) (model.UserWithToken, error)
- func VerifyAccessToken(token string, ctx context.Context, isVerifyAdministratorRole bool) (model.UserWithToken, error)
- type BatchOperateInfo
- type Extend
- type TaskInfoPageReq
- type TaskInfoReq
- type TaskResultPageReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddManageNetwork ¶
添加
func AddOsConfig ¶
添加OS操作系统
func AddSystemConfig ¶
添加
func AddTaskInfo ¶
func AddVmDevice ¶
func BatchAddDevice ¶
添加
func BatchCancelInstall ¶
取消安装
func BatchDelete ¶
func BatchDeleteScanDevice ¶
func BatchDeleteVm ¶
func BatchPowerOff ¶
func BatchPowerOn ¶
func BatchReInstall ¶
重装
func BatchReInstallVm ¶
重装
func BatchReStart ¶
func BatchReStartVm ¶
func BatchStartFromPxe ¶
func BatchStartVm ¶
func BatchStopVm ¶
func BatchUpdateDevice ¶
func CheckOnlineUpdate ¶
func CreateNewMacAddress ¶
func DBVersionUpdate ¶
func DeleteHardwareById ¶
func DeleteLocationById ¶
func DeleteManageNetworkById ¶
func DeleteNetworkById ¶
func DeleteOsConfigById ¶
OsConfig
func DeleteSystemConfigById ¶
SystemConfig
func DeleteTaskInfoByID ¶
func DeleteUserById ¶
func DeleteVmDeviceById ¶
func ExportDevice ¶
func ExportHardware ¶
func ExportScanDeviceList ¶
func GetCidrInfoByNetwork ¶
获取cidr信息
func GetCompanyByGroup ¶
func GetDeviceById ¶
func GetDeviceBySn ¶
func GetDeviceInstallReport ¶
func GetDeviceList ¶
func GetDeviceNumByStatus ¶
func GetDevicePrepareInstallInfo ¶
查询安装信息
func GetDhcpSubnetList ¶
func GetFullDeviceById ¶
func GetFullVmDeviceById ¶
func GetHardwareById ¶
func GetHardwareBySn ¶
func GetHardwareList ¶
func GetLocationById ¶
func GetLocationList ¶
func GetLocationListByPid ¶
func GetLocationTreeNameById ¶
func GetManageNetworkById ¶
func GetManageNetworkList ¶
func GetNetworkById ¶
func GetNetworkBySn ¶
func GetNetworkBySnForVm ¶
func GetNetworkList ¶
func GetOsConfigById ¶
func GetOsConfigList ¶
func GetPlatformConfigByName ¶
func GetScanDeviceByDeviceId ¶
func GetScanDeviceById ¶
func GetScanDeviceCompany ¶
func GetScanDeviceList ¶
func GetScanDeviceModelName ¶
func GetScanDeviceProduct ¶
func GetSession ¶
func GetSession(w rest.ResponseWriter, r *rest.Request) (model.UserWithToken, error)
func GetSystemBySn ¶
func GetSystemBySnForVm ¶
func GetSystemConfigById ¶
func GetSystemConfigList ¶
func GetTaskInfoPage ¶
func GetTaskResultPage ¶
func GetUserById ¶
func GetUserList ¶
func GetVmDeviceById ¶
func GetVmDeviceList ¶
func GetVmDeviceListByHostSn ¶
func GetVmHostBySn ¶
func GetVmHostList ¶
func ImportDevice ¶
func ImportDeviceForOpenApi ¶
func ImportPriview ¶
func InstallTimeoutProcess ¶
func IsInPreInstallList ¶
func IsInPreInstallListForVm ¶
func IsInPreInstallListForVm(ctx context.Context, w rest.ResponseWriter, mac string)
func ReceiveCallback ¶
func ReportInstallInfo ¶
上报安装进度
func ReportInstallInfoForVm ¶
func ReportMacInfo ¶
上报Mac信息,生成Pxe文件
func ReportProductInfo ¶
上报厂商信息
func RunCreateVmNoVncTokenFile ¶
create noVNC token file
func RunDeleteVmNoVncTokenFile ¶
delete noVNC token file
func RunGetVmHostInfo ¶
get vm host info
func RunGetVmHostPoolInfo ¶
func RunGetVmHostPoolInfo(repo model.Repo, logger logger.Logger, conf *config.Config, deviceId uint) (string, error)
get vm pool info
func RunGetVmInfo ¶
get vm info
func RunOnlineUpdate ¶
func RunTestConnectVmHost ¶
test connect vm host
func SaveDhcpSubnet ¶
func SavePlatformConfig ¶
func UpdateHardwareById ¶
func UpdateLocationById ¶
func UpdateManageNetworkById ¶
func UpdateMyInfo ¶
func UpdateNetworkById ¶
func UpdateOsConfigById ¶
func UpdateSystemConfigById ¶
func UpdateUserById ¶
func UpdateVmHostResource ¶
func UploadCompanyHardware ¶
func UploadDevice ¶
func UploadFile ¶
func UploadHardware ¶
func UploadScript ¶
func ValidateIp ¶
func ValidateMac ¶
func ValidateManageIp ¶
func ValidateSn ¶
func VerifyAccessPurview ¶
func VerifyAccessToken ¶
Types ¶
type BatchOperateInfo ¶
type BatchOperateInfo struct { Sn string AccessToken string UserID uint OobIp string Username string Password string }
func CheckPermissionForBatchOperate ¶
func CheckPermissionForBatchOperate(ctx context.Context, w rest.ResponseWriter, r *rest.Request, infos []BatchOperateInfo) (bool, []BatchOperateInfo)
type TaskInfoPageReq ¶
type TaskInfoReq ¶
type TaskInfoReq struct { TaskName string `json:"TaskName"` TaskType string `json:"TaskType"` //file or script TaskChannel string `json:"TaskChannel"` //ssh or salt RunAs string `json:"RunAs"` Timeout uint `json:"Timeout"` Extend Extend `json:"Extend"` SNs []string `json:"SNs"` Password string `json:"Password"` AccessToken string `json:"AccessToken"` }
Source Files ¶
- cron.go
- device.go
- device_install_callback.go
- device_install_report.go
- device_log.go
- dhcp_subnet.go
- hardware.go
- import.go
- location.go
- manage_network.go
- manufacturer.go
- network.go
- os_config.go
- platform_config.go
- resources_pool.go
- system_config.go
- task_info.go
- task_result.go
- user.go
- vm_device_log.go
- vm_host.go
- vm_install.go
- vm_shell.go
Click to show internal directories.
Click to hide internal directories.