1// +build !providerless
2// +build linux
3
4/*
5Copyright 2018 The Kubernetes Authors.
6
7Licensed under the Apache License, Version 2.0 (the "License");
8you may not use this file except in compliance with the License.
9You may obtain a copy of the License at
10
11    http://www.apache.org/licenses/LICENSE-2.0
12
13Unless required by applicable law or agreed to in writing, software
14distributed under the License is distributed on an "AS IS" BASIS,
15WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16See the License for the specific language governing permissions and
17limitations under the License.
18*/
19
20package vsphere
21
22import (
23	"io/ioutil"
24)
25
26const UUIDPath = "/sys/class/dmi/id/product_serial"
27
28func getRawUUID() (string, error) {
29	id, err := ioutil.ReadFile(UUIDPath)
30	if err != nil {
31		return "", err
32	}
33	return string(id), nil
34}
35