MCPcopy Index your code
hub / github.com/apache/cloudstack-go / RemoveGuestOs

Method RemoveGuestOs

cloudstack/GuestOSService.go:1606–1633  ·  view source on GitHub ↗

Removes a Guest OS from listing.

(p *RemoveGuestOsParams)

Source from the content-addressed store, hash-verified

1604
1605// Removes a Guest OS from listing.
1606func (s *GuestOSService) RemoveGuestOs(p *RemoveGuestOsParams) (*RemoveGuestOsResponse, error) {
1607 resp, err := s.cs.newPostRequest("removeGuestOs", p.toURLValues())
1608 if err != nil {
1609 return nil, err
1610 }
1611
1612 var r RemoveGuestOsResponse
1613 if err := json.Unmarshal(resp, &r); err != nil {
1614 return nil, err
1615 }
1616
1617 // If we have a async client, we need to wait for the async result
1618 if s.cs.async {
1619 b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout)
1620 if err != nil {
1621 if err == AsyncTimeoutErr {
1622 return &r, err
1623 }
1624 return nil, err
1625 }
1626
1627 if err := json.Unmarshal(b, &r); err != nil {
1628 return nil, err
1629 }
1630 }
1631
1632 return &r, nil
1633}
1634
1635type RemoveGuestOsResponse struct {
1636 Displaytext string `json:"displaytext"`

Callers

nothing calls this directly

Calls 3

newPostRequestMethod · 0.80
GetAsyncJobResultMethod · 0.80
toURLValuesMethod · 0.45

Tested by

no test coverage detected