Documentation ¶
Overview ¶
Copyright © 2021-2022 Nikita Ivanovski info@slnt-opp.xyz
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 © 2021-2022 Nikita Ivanovski info@slnt-opp.xyz
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 © 2021-2022 Nikita Ivanovski info@slnt-opp.xyz
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 ¶
- Variables
- func ConfigurePublicDataClient(logger *zap.Logger, rbmq *amqp.Connection)
- func ConfigureStatusesClient(logger *zap.Logger, rbmq *amqp.Connection)
- func MakePostStateRequest(uuid string, meta map[string]*structpb.Value) *stpb.ObjectState
- func PostServicesProviderPublicData(publicData *one.LocationPublicData)
- func PostServicesProviderState(state *one.LocationState)
- func Poweroff(client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value) (*ipb.InvokeResponse, error)
- func Reboot(client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value) (*ipb.InvokeResponse, error)
- func Resume(client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value) (*ipb.InvokeResponse, error)
- func SnapCreate(client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value) (*ipb.InvokeResponse, error)
- func SnapDelete(client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value) (*ipb.InvokeResponse, error)
- func SnapRevert(client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value) (*ipb.InvokeResponse, error)
- func StartVNC(client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value) (*ipb.InvokeResponse, error)
- func State(client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value) (*ipb.InvokeResponse, error)
- func StatusesClient(client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value, ...) (*ipb.InvokeResponse, error)
- func Suspend(client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value) (*ipb.InvokeResponse, error)
- type ServiceAction
Constants ¶
This section is empty.
Variables ¶
var ( Pub s.Pub SPPub s.Pub )
var Actions = map[string]ServiceAction{ "poweroff": Poweroff, "suspend": Suspend, "reboot": Reboot, "resume": Resume, "state": State, "snapcreate": SnapCreate, "snapdelete": SnapDelete, "snaprevert": SnapRevert, "start_vnc": StartVNC, }
var LCM_STATE_REF = map[int32]stpb.NoCloudState{ 0: stpb.NoCloudState_INIT, 1: stpb.NoCloudState_INIT, 2: stpb.NoCloudState_INIT, 3: stpb.NoCloudState_RUNNING, }
var (
SPPDPub pd.Pub
)
var STATES_REF = map[int32]stpb.NoCloudState{ 0: stpb.NoCloudState_INIT, 1: stpb.NoCloudState_INIT, 2: stpb.NoCloudState_INIT, 4: stpb.NoCloudState_STOPPED, 5: stpb.NoCloudState_SUSPENDED, 6: stpb.NoCloudState_DELETED, 8: stpb.NoCloudState_STOPPED, 9: stpb.NoCloudState_INIT, 10: stpb.NoCloudState_OPERATION, 11: stpb.NoCloudState_FAILURE, }
Functions ¶
func ConfigurePublicDataClient ¶
func ConfigurePublicDataClient(logger *zap.Logger, rbmq *amqp.Connection)
func ConfigureStatusesClient ¶
func ConfigureStatusesClient(logger *zap.Logger, rbmq *amqp.Connection)
func MakePostStateRequest ¶
func PostServicesProviderPublicData ¶
func PostServicesProviderPublicData(publicData *one.LocationPublicData)
func PostServicesProviderState ¶
func PostServicesProviderState(state *one.LocationState)
func Poweroff ¶
func Poweroff( client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value, ) (*ipb.InvokeResponse, error)
Powers off a running VM
func Reboot ¶
func Reboot( client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value, ) (*ipb.InvokeResponse, error)
Reboots an already deployed VM
func Resume ¶
func Resume( client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value, ) (*ipb.InvokeResponse, error)
Resumes the execution of a saved VM.
func SnapCreate ¶
func SnapCreate( client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value, ) (*ipb.InvokeResponse, error)
Creates new snapshot of vm
func SnapDelete ¶
func SnapDelete( client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value, ) (*ipb.InvokeResponse, error)
Deletes Snapshot by ID
func SnapRevert ¶
func SnapRevert( client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value, ) (*ipb.InvokeResponse, error)
Reverts Snapshot by ID
func State ¶
func State( client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value, ) (*ipb.InvokeResponse, error)
Returns the VM state of the VirtualMachine
func StatusesClient ¶
func StatusesClient( client *one.ONeClient, inst *ipb.Instance, data map[string]*structpb.Value, result *ipb.InvokeResponse, ) (*ipb.InvokeResponse, error)
Returns the VM state of the VirtualMachine to statuses server