Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge "Refactoring cassandra repair and cassandra status code so that…
… it can be used in config node, when config node has seperate config db." into R3.1
- Loading branch information
Showing
7 changed files
with
78 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# Copyright (c) 2016 Juniper Networks, Inc. All rights reserved. | ||
# | ||
|
||
import subprocess | ||
|
||
|
||
class CassandraManager(object): | ||
def __init__(self, cassandra_repair_logdir): | ||
self.cassandra_repair_logdir = cassandra_repair_logdir | ||
|
||
def status(self): | ||
subprocess.Popen(["contrail-cassandra-status", | ||
"--log-file", "/var/log/cassandra/status.log", | ||
"--debug"]) | ||
|
||
def repair(self): | ||
logdir = self.cassandra_repair_logdir + "repair.log" | ||
subprocess.Popen(["contrail-cassandra-repair", | ||
"--log-file", logdir, | ||
"--debug"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters