Update garm-provider-common and go-github
* Updates the garm-provider-common and go-github packages. * Update sqlToParamsInstance to return an error when unmarshaling This change is needed to pull in the new Seal/Unseal functions in common. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
4348999cb1
commit
d700b790ac
310 changed files with 10994 additions and 1955 deletions
|
|
@ -209,7 +209,7 @@ func (s *sqlDatabase) CreateOrganizationPool(ctx context.Context, orgId string,
|
|||
return params.Pool{}, errors.Wrap(err, "fetching pool")
|
||||
}
|
||||
|
||||
return s.sqlToCommonPool(pool), nil
|
||||
return s.sqlToCommonPool(pool)
|
||||
}
|
||||
|
||||
func (s *sqlDatabase) ListOrgPools(ctx context.Context, orgID string) ([]params.Pool, error) {
|
||||
|
|
@ -220,7 +220,10 @@ func (s *sqlDatabase) ListOrgPools(ctx context.Context, orgID string) ([]params.
|
|||
|
||||
ret := make([]params.Pool, len(pools))
|
||||
for idx, pool := range pools {
|
||||
ret[idx] = s.sqlToCommonPool(pool)
|
||||
ret[idx], err = s.sqlToCommonPool(pool)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "fetching pool")
|
||||
}
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
|
|
@ -231,7 +234,7 @@ func (s *sqlDatabase) GetOrganizationPool(ctx context.Context, orgID, poolID str
|
|||
if err != nil {
|
||||
return params.Pool{}, errors.Wrap(err, "fetching pool")
|
||||
}
|
||||
return s.sqlToCommonPool(pool), nil
|
||||
return s.sqlToCommonPool(pool)
|
||||
}
|
||||
|
||||
func (s *sqlDatabase) DeleteOrganizationPool(ctx context.Context, orgID, poolID string) error {
|
||||
|
|
@ -262,7 +265,11 @@ func (s *sqlDatabase) ListOrgInstances(ctx context.Context, orgID string) ([]par
|
|||
ret := []params.Instance{}
|
||||
for _, pool := range pools {
|
||||
for _, instance := range pool.Instances {
|
||||
ret = append(ret, s.sqlToParamsInstance(instance))
|
||||
paramsInstance, err := s.sqlToParamsInstance(instance)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "fetching instance")
|
||||
}
|
||||
ret = append(ret, paramsInstance)
|
||||
}
|
||||
}
|
||||
return ret, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue