Skip to content

Commit

Permalink
Merge pull request #146 from tomschwiha/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
rbeuque74 authored Apr 11, 2024
2 parents 2b2095a + e606200 commit 78392a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ $rights = [
// After allowing your application access, the customer will be redirected to this URL.
$redirectUrl = 'https://your_application_redirect_url'

$credentials = $conn->requestCredentials($rights, $redirectUrl);
$credentials = $ovh->requestCredentials($rights, $redirectUrl);

// Save consumer key and redirect to authentication page
$_SESSION['consumerKey'] = $credentials['consumerKey'];
Expand All @@ -131,15 +131,15 @@ $ovh = new Api($applicationKey,
$consumerKey);

// Load the list of dedicated servers
$servers = $conn->get('/dedicated/server/');
$servers = $ovh->get('/dedicated/server/');
foreach ($servers as $server) {
// Load the server details
$details = $conn->get('/dedicated/server/'.$server);
$details = $ovh->get('/dedicated/server/'.$server);
// Filter servers only inside GRA1
if ($details['datacenter'] == 'gra1') {
// Activate burst on server
$content = ['status' => 'active'];
$conn->put('/dedicated/server/'.$server.'/burst', $content);
$ovh->put('/dedicated/server/'.$server.'/burst', $content);
echo 'Burst enabled on '.$server;
}
}
Expand Down

0 comments on commit 78392a6

Please sign in to comment.