Documentation ¶
Index ¶
- Constants
- type DatetimeParams
- type DirectoryServicesParams
- type InterfaceParams
- type LdapArgParams
- type LoginSecurityParams
- type M1000e
- func (m *M1000e) ApplyCfg(config *cfgresources.ResourcesConfig) (err error)
- func (m *M1000e) ApplySecurityCfg(cfg LoginSecurityParams) (err error)
- func (m *M1000e) Blades() (blades []*devices.Blade, err error)
- func (m *M1000e) BmcType() (model string)
- func (m *M1000e) ChassisSnapshot() (chassis *devices.Chassis, err error)
- func (m *M1000e) Close() (err error)
- func (m *M1000e) FindBladePosition(serial string) (position int, err error)
- func (m *M1000e) FwVersion() (version string, err error)
- func (m *M1000e) IsActive() bool
- func (m *M1000e) IsOn() (status bool, err error)
- func (m *M1000e) IsOnBlade(position int) (status bool, err error)
- func (m *M1000e) Model() (model string, err error)
- func (m *M1000e) Name() (name string, err error)
- func (m *M1000e) NewSslMultipartUpload(endpoint string, params map[string]string, SslCert string, SslKey string) (err error)
- func (m *M1000e) Nics() (nics []*devices.Nic, err error)
- func (m *M1000e) PassThru() (passthru string, err error)
- func (m *M1000e) PowerCycle() (status bool, err error)
- func (m *M1000e) PowerCycleBlade(position int) (status bool, err error)
- func (m *M1000e) PowerCycleBmcBlade(position int) (status bool, err error)
- func (m *M1000e) PowerKw() (power float64, err error)
- func (m *M1000e) PowerOff() (status bool, err error)
- func (m *M1000e) PowerOffBlade(position int) (status bool, err error)
- func (m *M1000e) PowerOn() (status bool, err error)
- func (m *M1000e) PowerOnBlade(position int) (status bool, err error)
- func (m *M1000e) Psus() (psus []*devices.Psu, err error)
- func (m *M1000e) PxeOnceBlade(position int) (status bool, err error)
- func (m *M1000e) ReseatBlade(position int) (status bool, err error)
- func (m *M1000e) Serial() (serial string, err error)
- func (m *M1000e) SetDynamicPower(enable bool) (status bool, err error)
- func (m *M1000e) SetFlexAddressState(position int, enable bool) (status bool, err error)
- func (m *M1000e) SetIpmiOverLan(position int, enable bool) (status bool, err error)
- func (m *M1000e) Status() (status string, err error)
- func (m *M1000e) StorageBlades() (storageBlades []*devices.StorageBlade, err error)
- func (m *M1000e) TempC() (temp int, err error)
- func (m *M1000e) UpdateCredentials(username string, password string)
- func (m *M1000e) Vendor() (vendor string)
- type UserParams
Constants ¶
const (
// BMCType defines the bmc model that is supported by this package
BMCType = "m1000e"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatetimeParams ¶
type DatetimeParams struct { SessionToken string `url:"ST2"` //ST2=ba9a6bbf88764c829ca4f49146fd4817 NtpEnable bool `url:"NTP_enable,int"` //NTP_enable=1 NtpServer1 string `url:"NTP_server1"` //NTP_server1=ntp0.example.com NtpServer2 string `url:"NTP_server2"` //NTP_server2=ntp2.example.com NtpServer3 string `url:"NTP_server3"` //NTP_server3=ntp3.example.com DateTimeChanged bool `url:"datetimeChanged,int"` //datetimeChanged=0 CmcTimeTimezoneString string `url:"CMC_TIME_timezone_string"` //CMC_TIME_timezone_string=CET TzChanged bool `url:"tzChanged,int"` //tzChanged=1 }
cgi-bin/webcgi/datetime
type DirectoryServicesParams ¶
type DirectoryServicesParams struct { SessionToken string `url:"ST2"` SeviceSelected string `url:"service_selected"` //service_selected=ldap CertType int `url:"certType"` //certType=5 Action int `url:"action"` //action=1 Choose int `url:"choose"` //choose=2 GenLdapEnableCk bool `url:"GENLDAP_enable_ck,int"` //GENLDAP_enable_ck=1 GenLdapEnable bool `url:"GENLDAP_enable,int"` //GENLDAP_enable=1 GenLdapGroupAttributeIsDnCk bool `url:"GENLDAP_group_attribute_is_dn_ck,int"` //GENLDAP_group_attribute_is_dn_ck=1 GenLdapGroupAttributeIsDn bool `url:"GENLDAP_group_attribute_is_dn,int"` //GENLDAP_group_attribute_is_dn=1 GenLdapCertValidateEnableCk bool `url:"GENLDAP_cert_validate_enable_ck,int"` //GENLDAP_cert_validate_enable_ck=1 GenLdapCertValidateEnable bool `url:"GENLDAP_cert_validate_enable,int"` //GENLDAP_cert_validate_enable=1 GenLdapBindDn string `url:"GENLDAP_bind_dn"` //GENLDAP_bind_dn= GenLdapBindPasswd string `url:"GENLDAP_bind_passwd"` //GENLDAP_bind_passwd=PASSWORD GenLdapBindPasswdChanged bool `url:"GENLDAP_bind_passwd_changed,int"` //GENLDAP_bind_passwd_changed=0 GenLdapBaseDn string `url:"GENLDAP_base_dn"` //GENLDAP_base_dn=ou=People,dc=foo,dc=com GenLdapUserAttribute string `url:"GENLDAP_user_attribute"` //GENLDAP_user_attribute=uid GenLdapGroupAttribute string `url:"GENLDAP_group_attribute"` //GENLDAP_group_attribute=memberUid GenLdapSearchFilter string `url:"GENLDAP_search_filter"` //GENLDAP_search_filter= GenLdapConnectTimeoutSeconds int `url:"GENLDAP_connect_timeout_seconds"` //GENLDAP_connect_timeout_seconds=30 GenLdapSearchTimeoutSeconds int `url:"GENLDAP_search_timeout_seconds"` //GENLDAP_search_timeout_seconds=120 LdapServers int `url:"ldapservers"` //ldapservers=1 GenLdapServerAddr string `url:"GENLDAP_server_addr"` //GENLDAP_server_addr=ldaps.prod.foo.com GenLdapServerPort int `url:"GENLDAP_server_port"` //GENLDAP_server_port=636 GenLdapSrvLookupEnable bool `url:"GENLDAP_srvlookup_enable,int"` //GENLDAP_srvlookup_enable=0 AdEnable bool `url:"AD_enable,int"` //AD_enable=0 AdTfaSsoEnableBitmask1 int `url:"AD_tfa_sso_enable_bitmask.1"` //AD_tfa_sso_enable_bitmask.1=0 AdTfaSsoEnableBitmask2 int `url:"AD_tfa_sso_enable_bitmask.2"` //AD_tfa_sso_enable_bitmask.2=0 AdCertValidateEnableCk bool `url:"AD_cert_validate_enable_ck,int"` //AD_cert_validate_enable_ck=1 AdCertValidateEnable bool `url:"AD_cert_validate_enable,int"` //AD_cert_validate_enable=1 AdRootDomain string `url:"AD_root_domain"` //AD_root_domain= AdTimeout int `url:"AD_timeout"` //AD_timeout=120 AdFilterEnable bool `url:"AD_filter_enable,int"` //AD_filter_enable=0 AdDcFilter string `url:"AD_dc_filter"` //AD_dc_filter= AdGcFilter string `url:"AD_gc_filter"` //AD_gc_filter= AdSchemaExt int `url:"AD_schema_ext"` //AD_schema_ext=1 RoleGroupFlag int `url:"RoleGroupFlag"` //RoleGroupFlag=0 RoleGroupIndex string `url:"RoleGroupIndex"` //RoleGroupIndex= AdCmcName string `url:"AD_cmc_name"` //AD_cmc_name= AdCmcdomain string `url:"AD_cmc_domain"` //AD_cmc_domain= }
type InterfaceParams ¶
type InterfaceParams struct { SessionToken string `url:"ST2"` //ST2=2754be61766abf5808085b3f2dd7bd94 SerialEnable bool `url:"SERIAL_enable,int"` //SERIAL_enable=1 SerialRedirect bool `url:"SERIAL_redirect_enable,int"` //SERIAL_redirect_enable=1 SerialTimeout int `url:"SERIAL_timeout"` //SERIAL_timeout=1800 SerialBaudrate int `url:"SERIAL_baudrate"` //SERIAL_baudrate=115200 SerialConsoleNoAuth bool `url:"SERIAL_console_no_auth,int"` //SERIAL_console_no_auth=0 SerialQuitKey string `url:"SERIAL_quit_key"` //SERIAL_quit_key=^\ SerialHistoryBufSize int `url:"SERIAL_history_buf_size"` //SERIAL_history_buf_size=8192 SerialLoginCommand string `url:"SERIAL_login_command"` //SERIAL_login_command= WebserverEnable bool `url:"WEBSERVER_enable,int"` //WEBSERVER_enable=1 WebserverMaxSessions int `url:"WEBSERVER_maxsessions"` //WEBSERVER_maxsessions=4 WebserverTimeout int `url:"WEBSERVER_timeout"` //WEBSERVER_timeout=1800 WebserverHttpPort int `url:"WEBSERVER_http_port"` //WEBSERVER_http_port=80 WebserverHttpsPort int `url:"WEBSERVER_https_port"` //WEBSERVER_https_port=443 SshEnable bool `url:"SSH_enable,int"` //SSH_enable=1 SshMaxSessions int `url:"SSH_maxsessions"` //SSH_maxsessions=4 SshTimeout int `url:"SSH_timeout` //SSH_timeout=1800 SshPort int `url:"SSH_port"` //SSH_port=22 TelnetEnable bool `url:"TELNET_enable,int"` //TELNET_enable=1 TelnetMaxSessions int `url:"TELNET_maxsessions"` //TELNET_maxsessions=4 TelnetTimeout int `url:"TELNET_timeout"` //TELNET_timeout=1800 TelnetPort int `url:"TELNET_port"` //TELNET_port=23 RacadmEnable bool `url:"RACADM_enable,int"` //RACADM_enable=1 RacadmMaxSessions int `url:"RACADM_maxsessions"` //RACADM_maxsessions=4 RacadmTimeout int `url:"RACADM_timeout"` //RACADM_timeout=60 SnmpEnable bool `url:"SNMP_enable,int"` //SNMP_enable=1 SnmpCommunityNameGet string `url:"SNMP_COMMUNITYNAME_get"` //SNMP_COMMUNITYNAME_get=public SnmpProtocol int `url:"SNMP_Protocol"` //SNMP_Protocol=0 SnmpDiscoveryPortSet int `url:"SNMP_DiscoveryPort_set"` //SNMP_DiscoveryPort_set=161 ChassisLoggingRemoteSyslogEnable bool `url:"CHASSIS_LOGGING_remote_syslog_enable,int"` //CHASSIS_LOGGING_remote_syslog_enable=1 ChassisLoggingRemoteSyslogHost1 string `url:"CHASSIS_LOGGING_remote_syslog_host_1"` //CHASSIS_LOGGING_remote_syslog_host_1=machine.example.com ChassisLoggingRemoteSyslogHost2 string `url:"CHASSIS_LOGGING_remote_syslog_host_2"` //CHASSIS_LOGGING_remote_syslog_host_2= ChassisLoggingRemoteSyslogHost3 string `url:"CHASSIS_LOGGING_remote_syslog_host_3"` //CHASSIS_LOGGING_remote_syslog_host_3= ChassisLoggingRemoteSyslogPort int `url:"CHASSIS_LOGGING_remote_syslog_port"` //CHASSIS_LOGGING_remote_syslog_port=514 }
/cgi-bin/webcgi/interfaces
type LdapArgParams ¶
type LdapArgParams struct { SessionToken string `url:"ST2"` //ST2=2ee3449549f4f61b292e31c251da2b36 PrivBitmap int `url:"PrivBitmap"` //PrivBitmap=4095 Index int `url:"index"` //index=1 GenLdapRoleDn string `url:"GENLDAP_ROLE_dn"` //GENLDAP_ROLE_dn=cn=bmcAdmins,ou=Group,dc=activehotels,dc=com GenLdapRolePrivilege int `url:"GENLDAP_ROLE_privilege"` //GENLDAP_ROLE_privilege=4095 Login bool `url:"login,int"` //login=1 Cfg bool `url:"cfg,int"` //cfg=1 Cfguser bool `url:"cfguser,int"` //cfguser=1 Clearlog bool `url:"clearlog,int"` //clearlog=1 Chassiscontrol bool `url:"chassiscontrol,int"` //chassiscontrol=1 Superuser bool `url:"superuser,int"` //superuser=1 Serveradmin bool `url:"serveradmin,int"` //serveradmin=1 Testalert bool `url:"testalert,int"` //testalert=1 Debug bool `url:"debug,int"` //debug=1 Afabricadmin bool `url:"afabricadmin,int"` //afabricadmin=1 Bfabricadmin bool `url:"bfabricadmin,int"` //bfabricadmin=1 }
Setup LDAP role group - administrator
- the url parameter ?index=<int> and Index form value must match,
- the PrivBitmap, GenLdapRolePrivilege params must match, 4095 = Administrator - full access 3801 = Power user - no access to chassis, user config, debug commands 1 = Guest user - login access only
/cgi-bin/webcgi/ldaprg?index=1
type LoginSecurityParams ¶
type LoginSecurityParams struct { SessionToken string `url:"ST2"` //7bdaaa73307ebb471d0e71a9cecc44fb most likely the auth token EnforcedIpBlockEnable bool `url:"ENFORCED_IPBLOCK_enable,int"` //1 EnforcedIpBlockFailcount int `url:"ENFORCED_IPBLOCK_failcount"` //5 EnforcedIpBlockFailwindow int `url:"ENFORCED_IPBLOCK_failwindow"` //60 EnforcedIpBlockPenaltyTime int `url:"ENFORCED_IPBLOCK_penaltytime"` //300 }
/cgi-bin/webcgi/loginSecurity
type M1000e ¶
type M1000e struct { SessionToken string //required to set config // contains filtered or unexported fields }
M1000e holds the status and properties of a connection to a CMC device
func (*M1000e) ApplyCfg ¶
func (m *M1000e) ApplyCfg(config *cfgresources.ResourcesConfig) (err error)
func (*M1000e) ApplySecurityCfg ¶
func (m *M1000e) ApplySecurityCfg(cfg LoginSecurityParams) (err error)
Configures various interface params - syslog, snmp etc.
func (*M1000e) ChassisSnapshot ¶
ChassisSnapshot do best effort to populate the server data and returns a blade or discrete
func (*M1000e) FindBladePosition ¶
FindBladePosition receives a serial and find the position of the blade using it
func (*M1000e) NewSslMultipartUpload ¶
func (m *M1000e) NewSslMultipartUpload(endpoint string, params map[string]string, SslCert string, SslKey string) (err error)
setup a multipart form with the expected order of form parameters for the payload format see https://github.com/bmc-toolbox/bmclib/issues/3
func (*M1000e) PowerCycle ¶
PowerCycle reboots the machine via bmc
func (*M1000e) PowerCycleBlade ¶
PowerCycleBlade reboots the machine via bmc
func (*M1000e) PowerCycleBmcBlade ¶
PowerCycleBmcBlade reboots the bmc we are connected to
func (*M1000e) PowerOffBlade ¶
PowerOffBlade power off the machine via bmc
func (*M1000e) PowerOnBlade ¶
PowerOnBlade power on the machine via bmc
func (*M1000e) PxeOnceBlade ¶
PxeOnceBlade makes the machine to boot via pxe once
func (*M1000e) ReseatBlade ¶
ReseatBlade reboots the machine via bmc
func (*M1000e) SetDynamicPower ¶
Enable/Disable Dynamic Power - Dynamic Power Supply Engagement (DPSE) in Dell jargon. Dynamic Power Supply Engagement (DPSE) mode is disabled by default. DPSE saves power by optimizing the power efficiency of the PSUs supplying power to the chassis. This also increases the PSU life, and reduces heat generation.
func (*M1000e) SetFlexAddressState ¶
Disable/Enable FlexAddress disables flex Addresses for blades FlexAddress is a virtual addressing scheme
func (*M1000e) SetIpmiOverLan ¶
Enable/Disable IPMI over lan parameter per blade in chassis
func (*M1000e) StorageBlades ¶
func (m *M1000e) StorageBlades() (storageBlades []*devices.StorageBlade, err error)
StorageBlades returns all StorageBlades found in this chassis
func (*M1000e) UpdateCredentials ¶
UpdateCredentials updates login credentials
type UserParams ¶
type UserParams struct { SessionToken string `url:"ST2"` //ST2=ba9a6bbf88764c829ca4f49146fd4817 Privilege int `url:"Privilege"` //Privilege=4095 UserId int `url:"UserID"` //UserID=1 EnableUser bool `url:"EnableUser,int"` //EnableUser=1 UserName string `url:"UserName"` //UserName=Test ChangePassword bool `url:"ChangePassword,int"` //ChangePassword=1 Password string `url:"Password"` //Password=foobar ConfirmPassword string `url:"ConfirmPassword"` //ConfirmPassword=foobar CmcGroup int `url:"CMC_GROUP"` //CMC_GROUP=4095 Login bool `url:"login,int"` //login=1 Cfg bool `url:"cfg,int"` //cfg=1 CfgUser bool `url:"cfguser,int"` //cfguser=1 ClearLog bool `url:"clearlog,int"` //clearlog=1 ChassisControl bool `url:"chassiscontrol,int"` //chassiscontrol=1 SuperUser bool `url:"superuser,int"` //superuser=1 ServerAdmin bool `url:"serveradmin,int"` //serveradmin=1 TestAlert bool `url:"testalert,int"` //testalert=1 Debug bool `url:"debug,int"` //debug=1 AFabricAdmin bool `url:"afabricadmin,int"` //afabricadmin=1 BFabricAdmin bool `url:"bfabricadmin,int"` //bfabricadmin=1 CFabricAcminc bool `url:"cfabricadmin,int"` //cfabricadmin=1 }
Manages user login account parameters, notes:
- the url parameter ?id=<int> and UserID form value must match,
- the CMC_GROUP, Privilege params must match, 4095 = Administrator - full access 3801 = Power user - no access to chassis, user config, debug commands 1 = Guest user - login access only
Endpoint /webcgi/user?id=1