Skip to content

Commit

Permalink
comments added
Browse files Browse the repository at this point in the history
  • Loading branch information
KshitijaKakde committed Oct 17, 2023
1 parent e38ed0e commit b84ad34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inttests/system_limit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ import (
"github.com/stretchr/testify/assert"
)

// TestGetSystemLimits gets the list of system limits
func TestGetSystemLimits(t *testing.T) {
resp, err := C.GetSystemLimits()
fmt.Println("systemlimit", resp)
assert.NotNil(t, resp)
assert.Nil(t, err)
}

// TestGetMaxVol get the max volume
func TestGetMaxVol(t *testing.T) {
maxvolsize, err := C.GetMaxVol()
fmt.Println("max vol size", maxvolsize)
Expand Down
3 changes: 3 additions & 0 deletions system_limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import (
type emptyBody struct {
}

// GetSystemLimits gets list of sytem limits

func (c *Client) GetSystemLimits() (syslimit *types.Limit, err error) {
defer TimeSpent("GetSystemLimits", time.Now())
var e emptyBody
Expand All @@ -36,6 +38,7 @@ func (c *Client) GetSystemLimits() (syslimit *types.Limit, err error) {
return syslimit, nil
}

// GetMaxVol returns max volume size in GB
func (c *Client) GetMaxVol() (sys string, err error) {
defer TimeSpent("GetMaxVol", time.Now())
maxlimitType, err := c.GetSystemLimits()
Expand Down
2 changes: 2 additions & 0 deletions types/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1739,12 +1739,14 @@ type MDMQueueCommandDetails struct {
AllowedPhase string `json:"allowedPhase,omitempty"`
}

// QuerySystemLimits defines struct for query system limits
type QuerySystemLimits struct {
Type string `json:"type,omitempty"`
Description string `json:"description,omitempty"`
MaxVal string `json:"maxVal,omitempty"`
}

// SystemLimitEntryList defines struct for system limit entryList
type Limit struct {
SystemLimitEntryList []QuerySystemLimits `json:"systemLimitEntryList"`
}

0 comments on commit b84ad34

Please sign in to comment.