<commit_before>package apiv1

import (
	"errors"
	"os"
	"strconv"
	)

type GetStoragePoolsResp_entries struct {
	Entries `json:"entries"`
	Content []struct {
		StoragePoolName string `json:"i$ElementName"`
		InstanceName string `json:"i$InstanceID"`
		}
	}
//Get a list of all Storage Pools associated with SymmID
func (smis *SMIS) GetStoragePools(sid string) (resp *GetStoragePoolsResp, err error){
	err = smis.query("GET","/ecom/edaa/root/emc/instances/Symm_StorageSystem/CreationClassName::SymmStorageSystem,Name::" + sid + "/relationships/CIM_StoragePool", nil, &resp)
	return resp,err
}

//Get a list of Storage Volumes to/associated with a Device Masking Group
func (smis *SMIS) GetDeviceMaskingGroups(sid string) (resp *GetDeviceMaskingGroupsResp, err error){
	err = smis.query("GET","/ecom/edaa/root/emc/instances/Symm_StorageSystem/CreationClassName::Symm_StorageSystem,Name::" + sid + "/relationships/CIM_DeviceMaskingGroup", nil, &resp)
	return resp,err
}

//Get a list of Storage Volumes on/associated with SymmID
func (smis *SMIS) GetStorageVolumes(sid string) (resp *GetStorageVolumesResp, err error){
	err = smis.query("GET","/ecom/edaa/root/emc/instances/Symm_StorageSystem/CreationClassName::Symm_StorageSystem,Name::" + sid + "/relationships/CIM_StorageVolume", nil, &resp)
	return resp,err
}

type PostVolumesReq struct {

}

type PostVolumesContent struct {

	ElementType string `json: "ElementType"`
	Size string `json: "Size"`
	ElementName string `json: "ElementName"`
	EMCNumberOfDevices string `json: "EMCNumberOfDevices"`
	Type string `json: "@type"`
}
//Add goal struct later 

type PostVolumesResp struct {

}

//Create a Storage Volume
func (smis *SMIS) PostVolumes(req *PostVolumesReq, sid string) (resp *PostVolumesResp, err error){
	err = smis.query("POST","/ecom/edaa/root/emc/instances/Symm_StorageConfigurationService/CreationClassName::Symm_StorageConfigurationService,Name::EMCStorageConfigurationService,SystemCreationClassName::Symm_StorageSystem,SystemName::" + sid + "/action/CreateOrModifyElementFromStoragePool", req, &resp)
	return resp,err
}
<commit_msg>Added Post Device Masking & Initiator Group and structs<commit_after>package apiv1

import (
	"errors"
	"os"
	"strconv"
	)

type GetStoragePoolsResp struct {
	Entries `json:"entries"`{
		Content []struct {
			StoragePoolName string `json:"i$ElementName"`
			InstanceName string `json:"i$InstanceID"`
		} `json:"content"`
	} `json:"entries"`
}

//Get a list of all Storage Pools associated with SymmID
func (smis *SMIS) GetStoragePools(sid string) (resp *GetStoragePoolsResp, err error){
	err = smis.query("GET","/ecom/edaa/root/emc/instances/Symm_StorageSystem/CreationClassName::SymmStorageSystem,Name::" + sid + "/relationships/CIM_StoragePool", nil, &resp)
	return resp,err
}

type GetDeviceMaskingGroupsResp struct {
	Entries `json:"entries"`{
		Content []struct {
			DeviceMaskingGroupName string `json:"i$ElementName"`
			InstanceName string `json:"i$InstanceID"`
		} `json:"content"`
	} `json:"entries"`
}

//Get a list of Device Masking Groups associated with SymmID
func (smis *SMIS) GetDeviceMaskingGroups(sid string) (resp *GetDeviceMaskingGroupsResp, err error){
	err = smis.query("GET","/ecom/edaa/root/emc/instances/Symm_StorageSystem/CreationClassName::Symm_StorageSystem,Name::" + sid + "/relationships/CIM_DeviceMaskingGroup", nil, &resp)
	return resp,err
}

type GetStorageVolumesResp struct {
	Entries `json:"entries"`{
		Content []struct {
			DeviceName string `json:"i$DeviceID"`
		} `json:"content"`
	} `json:"entries"`
}

//Get a list of Storage Volumes on/associated with SymmID
func (smis *SMIS) GetStorageVolumes(sid string) (resp *GetStorageVolumesResp, err error){
	err = smis.query("GET","/ecom/edaa/root/emc/instances/Symm_StorageSystem/CreationClassName::Symm_StorageSystem,Name::" + sid + "/relationships/CIM_StorageVolume", nil, &resp)
	return resp,err
}

type PostDeviceMaskingGroupsContent struct {
	Content []struct {
		GroupName string `json: "GroupName"`
		Type int `json: "Type"`	
		//Type 2 for Initator Group, Type 4 for Device Masking Group
		@Type string `json: "@type"`
	} `json:"content"`
}

//Create a Device Masking Group (Same method call for Create an Initiator Group, but different Type in Content)
func (smis *SMIS) PostDeviceMaskingGroups (req *PostVolumesReq, sid string) (resp *PostVolumesResp, err error){
	err = smis.query("POST","/ecom/edaa/root/emc/instances/Symm_ControllerConfigurationService/CreationClassName::Symm_ControllerConfigurationService,Name::EMCControllerConfigurationService,SystemCreationClassName::Symm_StorageSystem,SystemName::" + sid + "/action/CreateGroup", req, &resp)
	return resp,err
}

type PostVolumesReq struct {

}

type PostVolumesContent struct {
	Content []struct {
		ElementType string `json: "ElementType"`
		Size string `json: "Size"`
		ElementName string `json: "ElementName"`
		EMCNumberOfDevices string `json: "EMCNumberOfDevices"`
		@Type string `json: "@type"`
		//Add goal stuct later {@type, InstanceID}
	} `json:"content"`
}

type PostVolumesResp struct {

}

//Create a Storage Volume
func (smis *SMIS) PostVolumes(req *PostVolumesReq, sid string) (resp *PostVolumesResp, err error){
	err = smis.query("POST","/ecom/edaa/root/emc/instances/Symm_StorageConfigurationService/CreationClassName::Symm_StorageConfigurationService,Name::EMCStorageConfigurationService,SystemCreationClassName::Symm_StorageSystem,SystemName::" + sid + "/action/CreateOrModifyElementFromStoragePool", req, &resp)
	return resp,err
}

{'fraction_non_alphanumeric': 0.12422811478387213, 'fraction_numerical': 0.000726480203414457, 'mean_word_length': 6.431848852901484, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1298308', 'n_tokens_mistral': 1827, 'n_tokens_neox': 1768, 'n_words': 420}