Skip to content

Commit

Permalink
Add ListIID API to All Resource Handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
powerkimhub committed Sep 23, 2024
1 parent fd95012 commit d0eac7f
Show file tree
Hide file tree
Showing 114 changed files with 2,080 additions and 1,361 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ package resources

import (
"encoding/json"
"errors"
"fmt"
"runtime/debug"
"strconv"
Expand Down Expand Up @@ -2276,3 +2277,8 @@ func waitUntilClusterSecurityGroupIdIsExist(csClient *cs2015.Client, clusterId s
cblogger.Debug(fmt.Sprintf("No Created NAT Gateway."))
}
*/

func (ClusterHandler *AlibabaClusterHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -746,3 +746,8 @@ func convertAlibabaDiskStatusToDiskStatus(aliDiskStaus string) (irs.DiskStatus,
}
return returnStatus, nil
}

func (DiskHandler *AlibabaDiskHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -414,3 +414,8 @@ func (keyPairHandler *AlibabaKeyPairHandler) CheckKeyPairFolder(keyPairPath stri
}
return nil
}

func (keyPairHandler *AlibabaKeyPairHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -410,3 +410,8 @@ func (myImageHandler *AlibabaMyImageHandler) DeleteSnapshotBySnapshotID(snapshot

return true, err
}

func (ImageHandler *AlibabaMyImageHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -1415,3 +1415,8 @@ func (NLBHandler *AlibabaNLBHandler) validateCreateNLB(nlbReqInfo irs.NLBInfo) e

return nil
}

func (NLBHandler *AlibabaNLBHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -605,3 +605,9 @@ func sameRulesCheck(presentSecurityRules *[]irs.SecurityRuleInfo, reqSecurityRul

return nil
}

func (securityHandler *AlibabaSecurityHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}

Original file line number Diff line number Diff line change
Expand Up @@ -1218,3 +1218,8 @@ func (vmHandler *AlibabaVMHandler) getDiskInfo(instanceId string) ecs.Disk {

return response.Disks.Disk[0]
}

func (vmHandler *AlibabaVMHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -587,3 +587,8 @@ func (VPCHandler *AlibabaVPCHandler) RemoveSubnet(vpcIID irs.IID, subnetIID irs.

return VPCHandler.DeleteSubnet(subnetIID)
}

func (vpcHandler *AlibabaVPCHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -1114,3 +1114,8 @@ func convertClusterStatusToClusterInfoStatus(clusterStatus string) irs.ClusterSt

return status
}

func (ClusterHandler *AwsClusterHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -914,3 +914,9 @@ func (DiskHandler *AwsDiskHandler) convertVolumeInfoToDiskInfo(volumeInfo *ec2.V

return diskInfo, nil
}


func (DiskHandler *AwsDiskHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -461,3 +461,8 @@ func CreateHashString(credentialInfo idrv.CredentialInfo, Region idrv.RegionInfo
}
return fmt.Sprintf("%x", hasher.Sum(nil)), nil
}

func (keyPairHandler *AwsKeyPairHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -621,3 +621,8 @@ func (ImageHandler *AwsMyImageHandler) CheckWindowsImage(myImageIID irs.IID) (bo
return isWindowsImage, nil

}

func (ImageHandler *AwsMyImageHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -1772,3 +1772,9 @@ func (NLBHandler *AwsNLBHandler) ChangeHealthCheckerInfo(nlbIID irs.IID, healthC

return retTargetGroupInfo.HealthChecker, nil
}


func (NLBHandler *AwsNLBHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -944,3 +944,8 @@ func (securityHandler *AwsSecurityHandler) ProcessRemoveRules(newGroupId *string

return securityHandler.GetSecurity(irs.IID{SystemId: *newGroupId})
}

func (securityHandler *AwsSecurityHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -1705,3 +1705,8 @@ func (vmHandler *AwsVMHandler) AttachNetworkInterface(vNicId string, instanceId

return true, nil
}

func (vmHandler *AwsVMHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -1149,3 +1149,8 @@ func (VPCHandler *AwsVPCHandler) RemoveSubnet(vpcIID irs.IID, subnetIID irs.IID)
return VPCHandler.DeleteSubnet(subnetIID)
//return false, nil
}

func (vpcHandler *AwsVPCHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -2364,3 +2364,8 @@ func getClusterAccessInfo(cluster *armcontainerservice.ManagedCluster, managedCl
}
return accessInfo, nil
}

func (ClusterHandler *AzureClusterHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -747,3 +747,8 @@ func AttachList(diskIIDList []irs.IID, ownerVM irs.IID, credentialInfo idrv.Cred
}
return vm, nil
}

func (DiskHandler *AzureDiskHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"

"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v6"

call "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/call-log"
Expand Down Expand Up @@ -266,3 +267,8 @@ func checkKeyPairReqInfo(keyPairReqInfo irs.KeyPairReqInfo) error {
}
return nil
}

func (keyPairHandler *AzureKeyPairHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -506,3 +506,8 @@ func (myImageHandler *AzureMyImageHandler) CheckWindowsImage(myImageIID irs.IID)
LoggingError(hiscallInfo, checkWindowsImageErr)
return false, checkWindowsImageErr
}

func (ImageHandler *AzureMyImageHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -1645,3 +1645,8 @@ func checkValidationNLBHealthCheck(healthCheckerInfo irs.HealthCheckerInfo) erro
}
return nil
}

func (NLBHandler *AzureNLBHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -764,3 +764,9 @@ func getAddAzureRules(baseRawRules []*armnetwork.SecurityRule, addRuleInfo *[]ir
}
return &azureSGRuleList, nil
}

func (securityHandler *AzureSecurityHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}

Original file line number Diff line number Diff line change
Expand Up @@ -1848,3 +1848,8 @@ func windowUserIdCheck(userId string) (bool, error) {
}
return false, errors.New("for Windows, the userId only provides Administrator")
}

func (vmHandler *AzureVMHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"

"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v6"

call "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/call-log"
Expand Down Expand Up @@ -336,3 +337,8 @@ func getRawVirtualNetwork(vpcIID irs.IID, virtualNetworksClient *armnetwork.Virt
return &resp.VirtualNetwork, err
}
}

func (vpcHandler *AzureVPCHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -505,3 +505,8 @@ func (diskHandler *ClouditDiskHandler) detachDisk(diskIID irs.IID, ownerVmIID ir

return nil
}

func (DiskHandler *ClouditDiskHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -579,3 +579,8 @@ func (myImageHandler *ClouditMyImageHandler) CheckWindowsImage(myImageIID irs.II
LoggingInfo(hiscallInfo, start)
return isWindows, nil
}

func (ImageHandler *ClouditMyImageHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -1127,3 +1127,8 @@ func healthCheckPolicyValidation(info irs.HealthCheckerInfo) (bool, error) {
}
return true, nil
}

func (NLBHandler *ClouditNLBHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -604,3 +604,8 @@ func addDefaultOutBoundRule(baseRuleInfos []irs.SecurityRuleInfo, addRules *[]se
}
return nil
}

func (securityHandler *ClouditSecurityHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ import (
"encoding/json"
"errors"
"fmt"
cdcom "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/common"
"github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/cloudit/client/ace/disk"
"github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/cloudit/client/ace/snapshot"
"strconv"
"strings"
"time"

cdcom "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/common"
"github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/cloudit/client/ace/disk"
"github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/cloudit/client/ace/snapshot"

call "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/call-log"
"github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/cloudit/client"
"github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/cloudit/client/ace/nic"
Expand Down Expand Up @@ -1268,3 +1269,8 @@ func notSupportRootDiskCustom(vmReqInfo irs.VMReqInfo) error {
}
return nil
}

func (vmHandler *ClouditVMHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ package resources
import (
"errors"
"fmt"
"net"
"strconv"
"strings"

call "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/call-log"
keypair "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/common"
"github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/cloudit/client"
"github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/cloudit/client/dna/subnet"
idrv "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces"
irs "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces/resources"
"net"
"strconv"
"strings"
)

const (
Expand Down Expand Up @@ -718,3 +719,8 @@ func makeSliceUnique(s []string) []string {
}
return res
}

func (VPCHandler *ClouditVPCHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package resources

import (
"context"
"errors"
"strconv"
"time"

Expand Down Expand Up @@ -265,3 +266,8 @@ func (vmHandler *DockerVMHandler) GetVM(vmIID irs.IID) (irs.VMInfo, error) {
}
return getVMInfoByContainerJSON(vmHandler.Region, vmIID, container), nil
}

func (vmHandler *DockerVMHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -1351,3 +1351,8 @@ func validateAtChangeNodeGroupScaling(clusterIID irs.IID, nodeGroupIID irs.IID,
}
return nil
}

func (ClusterHandler *GCPClusterHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -540,3 +540,8 @@ func convertDiskInfo(diskResp *compute.Disk) (irs.DiskInfo, error) {

return diskInfo, nil
}

func (DiskHandler *GCPDiskHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,8 @@ func (keyPairHandler *GCPKeyPairHandler) DeleteKey(keyIID irs.IID) (bool, error)

return true, nil
}

func (keyPairHandler *GCPKeyPairHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package resources

import (
"context"
"errors"
"strings"
"time"

Expand Down Expand Up @@ -201,3 +202,8 @@ func (MyImageHandler *GCPMyImageHandler) CheckWindowsImage(myImageIID irs.IID) (

return isWindows, nil
}

func (ImageHandler *GCPMyImageHandler) ListIID() ([]*irs.IID, error) {
cblogger.Info("Cloud driver: called ListIID()!!")
return nil, errors.New("Does not support ListIID() yet!!")
}
Loading

0 comments on commit d0eac7f

Please sign in to comment.