Documentation ¶
Overview ¶
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
Package clientManager provides a CLI to end-users ¶
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
################################################################################ # Copyright 2019 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################################
Index ¶
- func GetClientSetup(outputFormat string) (string, error)
- func NewToken() string
- func NewTokenFile(filePath string) error
- func RemoveAPISetup() error
- func SetClientSetup(urlIn string, outputFormat string, timeout string, caCertPath string, ...) error
- type CommandsRunnerClient
- func (crc *CommandsRunnerClient) Curl(method string, url string, dataPath string) (string, error)
- func (crc *CommandsRunnerClient) DeleteStateStates(extensionName string, pos int, stateName string) (string, error)
- func (crc *CommandsRunnerClient) GenerateConfig(extensionName string) (string, error)
- func (crc *CommandsRunnerClient) GetCMStatus() (string, error)
- func (crc *CommandsRunnerClient) GetCRAbout() (string, error)
- func (crc *CommandsRunnerClient) GetCRLogLevel() (string, error)
- func (crc *CommandsRunnerClient) GetCRLogMaxBackups() (string, error)
- func (crc *CommandsRunnerClient) GetCRSettings() (string, error)
- func (crc *CommandsRunnerClient) GetConfig(extensionName string) (string, error)
- func (crc *CommandsRunnerClient) GetExtensions(extensionToList string, catalog bool) (string, error)
- func (crc *CommandsRunnerClient) GetLogs(extensionName string, stateName string, follow bool, quiet bool) error
- func (crc *CommandsRunnerClient) GetMockEngine() (string, error)
- func (crc *CommandsRunnerClient) GetProperty(extensionName string, propertyName string) (string, error)
- func (crc *CommandsRunnerClient) GetState(extensionName string, stateName string) (string, error)
- func (crc *CommandsRunnerClient) GetStates(extensionName string, status string, extensionOnly bool, recursive bool) (string, error)
- func (crc *CommandsRunnerClient) GetTemplate(extensionName string, uiConfigName string) (string, error)
- func (crc *CommandsRunnerClient) GetUIMetadata(extensionName string, uiConfigName string) (string, error)
- func (crc *CommandsRunnerClient) GetUIMetadatas(extensionName string, namesOnly bool) (string, error)
- func (crc *CommandsRunnerClient) InsertStateStates(extensionName string, pos int, stateName string, before bool, statePath string, ...) (string, error)
- func (crc *CommandsRunnerClient) IsRunningEngine(extensionName string) (string, error)
- func (crc *CommandsRunnerClient) RegisterExtension(pathToZip, extensionName string, force bool) (string, error)
- func (crc *CommandsRunnerClient) ResetEngine(extensionName string) (string, error)
- func (crc *CommandsRunnerClient) RestCall(method string, baseUrl string, uri string, bodyReader io.Reader, ...) (string, int, error)
- func (crc *CommandsRunnerClient) SetCMStatus(name string, status string) (string, error)
- func (crc *CommandsRunnerClient) SetCRLogLevel(level string) (string, error)
- func (crc *CommandsRunnerClient) SetCRLogMaxBackups(maxBackups string) (string, error)
- func (crc *CommandsRunnerClient) SetConfig(extensionName string, configPath string) (string, error)
- func (crc *CommandsRunnerClient) SetMockEngine(mock bool) (string, error)
- func (crc *CommandsRunnerClient) SetState(extensionName string, stateName string, newStatus string, scriptTimeout string) error
- func (crc *CommandsRunnerClient) SetStates(extensionName string, statesPath string, overwrite bool) (string, error)
- func (crc *CommandsRunnerClient) SetStatesStatuses(extensionName string, newStatus string, fromState string, fromInclude bool, ...) (string, error)
- func (crc *CommandsRunnerClient) StartEngine(extensionName string, fromState string, toState string) (string, error)
- func (crc *CommandsRunnerClient) UnregisterExtension(extensionName string) (string, error)
- func (crc *CommandsRunnerClient) ValidateConfig(extensionName string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClientSetup ¶
GetAPISetup retrieves the API Setup
func NewTokenFile ¶
NewTokenFile creates a file containing a token
func RemoveAPISetup ¶
func RemoveAPISetup() error
RemoveAPISetup removes the file where the API Setup is stored
Types ¶
type CommandsRunnerClient ¶
type CommandsRunnerClient struct { URL string `json:"url"` OutputFormat string `json:"output_format"` Timeout int `json:"timeout"` CACertPath string `json:"ca_cert_path"` Token string `json:"token"` InsecureSSL bool DefaultExtensionName string `json:"default_extension_name"` // contains filtered or unexported fields }
func NewClient ¶
func NewClient(urlIn string, outputFormat string, timeout string, caCertPath string, insecureSSL string, token string, defaultExtensionName string) (*CommandsRunnerClient, error)
NewClient creates a new client
func (*CommandsRunnerClient) DeleteStateStates ¶
func (*CommandsRunnerClient) GenerateConfig ¶
func (crc *CommandsRunnerClient) GenerateConfig(extensionName string) (string, error)
GenerateConfig generattes bmxconfig file
func (*CommandsRunnerClient) GetCMStatus ¶
func (crc *CommandsRunnerClient) GetCMStatus() (string, error)
GetCMStatus returns the configManager status
func (*CommandsRunnerClient) GetCRAbout ¶
func (crc *CommandsRunnerClient) GetCRAbout() (string, error)
GetAbout of CR
func (*CommandsRunnerClient) GetCRLogLevel ¶
func (crc *CommandsRunnerClient) GetCRLogLevel() (string, error)
GetLogLevel of PCM
func (*CommandsRunnerClient) GetCRLogMaxBackups ¶
func (crc *CommandsRunnerClient) GetCRLogMaxBackups() (string, error)
GetCRLogMaxBackups of CR
func (*CommandsRunnerClient) GetCRSettings ¶
func (crc *CommandsRunnerClient) GetCRSettings() (string, error)
GetCRSettings of CR
func (*CommandsRunnerClient) GetConfig ¶
func (crc *CommandsRunnerClient) GetConfig(extensionName string) (string, error)
GetConfig returns the config
func (*CommandsRunnerClient) GetExtensions ¶
func (crc *CommandsRunnerClient) GetExtensions(extensionToList string, catalog bool) (string, error)
func (*CommandsRunnerClient) GetLogs ¶
func (crc *CommandsRunnerClient) GetLogs(extensionName string, stateName string, follow bool, quiet bool) error
GetLogs returns the logs of a given state, if state not provided will retrieve logs from the first state. if follow = true the method will loop for new data in the log if quiet = true then log are not displayed but the method will wait until the deploy is done.
func (*CommandsRunnerClient) GetMockEngine ¶
func (crc *CommandsRunnerClient) GetMockEngine() (string, error)
func (*CommandsRunnerClient) GetProperty ¶
func (crc *CommandsRunnerClient) GetProperty(extensionName string, propertyName string) (string, error)
func (*CommandsRunnerClient) GetState ¶
func (crc *CommandsRunnerClient) GetState(extensionName string, stateName string) (string, error)
GetState returns the status of a given state
func (*CommandsRunnerClient) GetStates ¶
func (crc *CommandsRunnerClient) GetStates(extensionName string, status string, extensionOnly bool, recursive bool) (string, error)
GetStates returns the states having a specific status
func (*CommandsRunnerClient) GetTemplate ¶
func (crc *CommandsRunnerClient) GetTemplate(extensionName string, uiConfigName string) (string, error)
GetUIConfig reeturns the uiconfig
func (*CommandsRunnerClient) GetUIMetadata ¶
func (crc *CommandsRunnerClient) GetUIMetadata(extensionName string, uiConfigName string) (string, error)
GetUIConfig reeturns the uiconfig
func (*CommandsRunnerClient) GetUIMetadatas ¶
func (crc *CommandsRunnerClient) GetUIMetadatas(extensionName string, namesOnly bool) (string, error)
func (*CommandsRunnerClient) InsertStateStates ¶
func (*CommandsRunnerClient) IsRunningEngine ¶
func (crc *CommandsRunnerClient) IsRunningEngine(extensionName string) (string, error)
IsRunningEngine checks if engine is running". No running state must exit
func (*CommandsRunnerClient) RegisterExtension ¶
func (crc *CommandsRunnerClient) RegisterExtension(pathToZip, extensionName string, force bool) (string, error)
func (*CommandsRunnerClient) ResetEngine ¶
func (crc *CommandsRunnerClient) ResetEngine(extensionName string) (string, error)
ResetEngine resets states, all not "SKIP" states will be set to "READY". No running state must exit
func (*CommandsRunnerClient) RestCall ¶
func (crc *CommandsRunnerClient) RestCall(method string, baseUrl string, uri string, bodyReader io.Reader, headers map[string]string) (string, int, error)
Do a restcall to a given uri
func (*CommandsRunnerClient) SetCMStatus ¶
func (crc *CommandsRunnerClient) SetCMStatus(name string, status string) (string, error)
SetCMStatus set a status
func (*CommandsRunnerClient) SetCRLogLevel ¶
func (crc *CommandsRunnerClient) SetCRLogLevel(level string) (string, error)
func (*CommandsRunnerClient) SetCRLogMaxBackups ¶
func (crc *CommandsRunnerClient) SetCRLogMaxBackups(maxBackups string) (string, error)
func (*CommandsRunnerClient) SetConfig ¶
func (crc *CommandsRunnerClient) SetConfig(extensionName string, configPath string) (string, error)
SetConfig saves config
func (*CommandsRunnerClient) SetMockEngine ¶
func (crc *CommandsRunnerClient) SetMockEngine(mock bool) (string, error)
MockEngine set/unset engine mock mode. No running state must exit
func (*CommandsRunnerClient) SetState ¶
func (crc *CommandsRunnerClient) SetState(extensionName string, stateName string, newStatus string, scriptTimeout string) error
SetState
func (*CommandsRunnerClient) SetStates ¶
func (crc *CommandsRunnerClient) SetStates(extensionName string, statesPath string, overwrite bool) (string, error)
Set a state file
func (*CommandsRunnerClient) SetStatesStatuses ¶
func (crc *CommandsRunnerClient) SetStatesStatuses(extensionName string, newStatus string, fromState string, fromInclude bool, toState string, toInclude bool) (string, error)
Set a state file
func (*CommandsRunnerClient) StartEngine ¶
func (crc *CommandsRunnerClient) StartEngine(extensionName string, fromState string, toState string) (string, error)
StartEngine returns the states
func (*CommandsRunnerClient) UnregisterExtension ¶
func (crc *CommandsRunnerClient) UnregisterExtension(extensionName string) (string, error)
func (*CommandsRunnerClient) ValidateConfig ¶
func (crc *CommandsRunnerClient) ValidateConfig(extensionName string) (string, error)
ValidateConfig saves config