in pkg/cloud_provider/lustre/lustre.go [291:314]
func cloudInstanceToServiceInstance(instance *lustrepb.Instance) (*ServiceInstance, error) {
project, location, name, err := parseInstanceFullName(instance.GetName())
if err != nil {
return nil, err
}
ip, err := parseInstanceIP(instance.GetMountPoint())
if err != nil {
return nil, err
}
return &ServiceInstance{
Name: name,
Location: location,
Project: project,
Network: instance.GetNetwork(),
Description: instance.GetDescription(),
State: instance.GetState().String(),
Labels: instance.GetLabels(),
CapacityGib: instance.GetCapacityGib(),
Filesystem: instance.GetFilesystem(),
IP: ip,
}, nil
}