code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public ArrayList<String> ip_firewall_GET(String ip, Boolean enabled, OvhFirewallStateEnum state) throws IOException {
String qPath = "/ip/{ip}/firewall";
StringBuilder sb = path(qPath, ip);
query(sb, "enabled", enabled);
query(sb, "state", state);
String resp = exec(qPath, "GET", sb.toString(), null);
retur... | java |
public OvhFirewallIp ip_firewall_POST(String ip, String ipOnFirewall) throws IOException {
String qPath = "/ip/{ip}/firewall";
StringBuilder sb = path(qPath, ip);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "ipOnFirewall", ipOnFirewall);
String resp = exec(qPath, "POST", sb.toString()... | java |
public ArrayList<Long> ip_firewall_ipOnFirewall_rule_GET(String ip, String ipOnFirewall, OvhFirewallRuleStateEnum state) throws IOException {
String qPath = "/ip/{ip}/firewall/{ipOnFirewall}/rule";
StringBuilder sb = path(qPath, ip, ipOnFirewall);
query(sb, "state", state);
String resp = exec(qPath, "GET", sb.t... | java |
public OvhFirewallNetworkRule ip_firewall_ipOnFirewall_rule_POST(String ip, String ipOnFirewall, OvhFirewallActionEnum action, Long destinationPort, OvhFirewallProtocolEnum protocol, OvhFirewallSequenceRangeEnum sequence, String source, Long sourcePort, OvhFirewallOptionTCP tcpOption) throws IOException {
String qPat... | java |
public ArrayList<String> GET(String description, String ip, String routedTo_serviceName, OvhIpTypeEnum type) throws IOException {
String qPath = "/ip";
StringBuilder sb = path(qPath);
query(sb, "description", description);
query(sb, "ip", ip);
query(sb, "routedTo.serviceName", routedTo_serviceName);
query(s... | java |
public OvhLoadBalancingTask loadBalancing_serviceName_importCustomSsl_POST(String serviceName, String certificate, String chain, String key) throws IOException {
String qPath = "/ip/loadBalancing/{serviceName}/importCustomSsl";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<St... | java |
public String loadBalancing_serviceName_internalNatIp_GET(String serviceName, OvhLoadBalancingZoneEnum zone) throws IOException {
String qPath = "/ip/loadBalancing/{serviceName}/internalNatIp";
StringBuilder sb = path(qPath, serviceName);
query(sb, "zone", zone);
String resp = exec(qPath, "GET", sb.toString(), ... | java |
public OvhLoadBalancingTask loadBalancing_serviceName_backend_backend_setWeight_POST(String serviceName, String backend, Long weight) throws IOException {
String qPath = "/ip/loadBalancing/{serviceName}/backend/{backend}/setWeight";
StringBuilder sb = path(qPath, serviceName, backend);
HashMap<String, Object>o = ... | java |
public OvhLoadBalancingTask loadBalancing_serviceName_backend_backend_backupState_POST(String serviceName, String backend, Boolean backupStateSet, String mainBackendIp) throws IOException {
String qPath = "/ip/loadBalancing/{serviceName}/backend/{backend}/backupState";
StringBuilder sb = path(qPath, serviceName, ba... | java |
public OvhLoadBalancingTask loadBalancing_serviceName_backend_POST(String serviceName, String ipBackend, OvhLoadBalancingBackendProbeEnum probe, Long weight) throws IOException {
String qPath = "/ip/loadBalancing/{serviceName}/backend";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new H... | java |
public OvhLoadBalancingTask loadBalancing_serviceName_portsRedirection_srcPort_DELETE(String serviceName, net.minidev.ovh.api.ip.OvhLoadBalancingAdditionalPortEnum srcPort) throws IOException {
String qPath = "/ip/loadBalancing/{serviceName}/portsRedirection/{srcPort}";
StringBuilder sb = path(qPath, serviceName, s... | java |
public ArrayList<OvhLoadBalancingAdditionalPortEnum> loadBalancing_serviceName_portsRedirection_GET(String serviceName) throws IOException {
String qPath = "/ip/loadBalancing/{serviceName}/portsRedirection";
StringBuilder sb = path(qPath, serviceName);
String resp = exec(qPath, "GET", sb.toString(), null);
retu... | java |
public OvhLoadBalancingTask loadBalancing_serviceName_portsRedirection_POST(String serviceName, OvhLoadBalancingPort body) throws IOException {
String qPath = "/ip/loadBalancing/{serviceName}/portsRedirection";
StringBuilder sb = path(qPath, serviceName);
String resp = exec(qPath, "POST", sb.toString(), body);
... | java |
public OvhLoadBalancingTask loadBalancing_serviceName_stickiness_POST(String serviceName, OvhLoadBalancingStickinessEnum stickiness) throws IOException {
String qPath = "/ip/loadBalancing/{serviceName}/stickiness";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>... | java |
public ArrayList<String> loadBalancing_serviceName_probeIp_GET(String serviceName, OvhLoadBalancingZoneEnum zone) throws IOException {
String qPath = "/ip/loadBalancing/{serviceName}/probeIp";
StringBuilder sb = path(qPath, serviceName);
query(sb, "zone", zone);
String resp = exec(qPath, "GET", sb.toString(), n... | java |
public OvhCompany register_company_POST(OvhOVHCertifications OVHCertifications, OvhOVHCustomersAdvisedEnum OVHCustomersAdvised, OvhKnowledgeResourcesRangeEnum OVHKnowledgeResources, OvhOVHProductsUsed OVHProductsUsed, OvhTechnicalAdvancedResourcesRangeEnum OVHTechnicalAdvancedResources, OvhTechnicalExpertResourcesRange... | java |
public OvhCompany register_company_companyId_GET(String companyId) throws IOException {
String qPath = "/partners/register/company/{companyId}";
StringBuilder sb = path(qPath, companyId);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhCompany.class);
} | java |
public OvhContact register_company_companyId_contact_POST(String companyId, String email, String facebook, String firstName, String lastName, String linkedin, Boolean newsletter, OvhNic[] otherNics, String phone, String role, String twitter) throws IOException {
String qPath = "/partners/register/company/{companyId}/... | java |
public OvhApplication register_company_companyId_application_POST(String companyId, Boolean termsAndConditionsOfServiceAccepted) throws IOException {
String qPath = "/partners/register/company/{companyId}/application";
StringBuilder sb = path(qPath, companyId);
HashMap<String, Object>o = new HashMap<String, Objec... | java |
public static DB database(String url, String user, String password) throws SQLException {
return database(DriverManager.getConnection(url, user, password));
} | java |
public static <T> TypedDataSet<T> data(DataSource dataSource, Conversion<T> conv) {
return new TypedDataSet<>(dataSource, conv);
} | java |
@SafeVarargs
public static Query query(DB db, String sql, Object... args) {
return new Query(db, sql, args);
} | java |
@SafeVarargs
public static void
takeSnapshot(DataSource... dataSources) {
ensureDistinctDataSources(dataSources, Function.identity());
foreach(dataSources,
(callInfo, dataSource) -> dataSource.executeQuery(callInfo, true),
CallInfo.create());
} | java |
public static void assertEquals(DataSet expected, DataSet actual) throws DBAssertionError {
DBAssert.dataSetAssertion(CallInfo.create(), expected, actual);
} | java |
public static void assertTableExists(DB db, String tableName) throws DBAssertionError {
DBAssert.assertTableExistence(CallInfo.create(), db, tableName, true);
} | java |
public static void assertTableDoesNotExist(DB db, String tableName) throws DBAssertionError {
DBAssert.assertTableExistence(CallInfo.create(), db, tableName, false);
} | java |
@SafeVarargs
public static void assertTableExists(DB db, String... tableNames) throws DBAssertionError {
multipleTableExistenceAssertions(CallInfo.create(), db, tableNames, true);
} | java |
@SafeVarargs
public static void insert(DataSet... dataSets) {
foreach(dataSets, DBSetup::insert, CallInfo.create());
} | java |
@SafeVarargs
public static void update(DataSet... dataSets) {
foreach(dataSets, DBSetup::update, CallInfo.create());
} | java |
@SafeVarargs
public static void delete(DataSet... dataSets) {
foreach(dataSets, DBSetup::delete, CallInfo.create());
} | java |
@SafeVarargs
public static void populate(DataSet... dataSets) {
ensureDistinctDataSources(dataSets, DataSet::getSource);
foreach(dataSets, DBSetup::populate, CallInfo.create());
} | java |
@SafeVarargs
public static void deleteAll(Table... tables) {
foreach(tables, DBSetup::deleteAll, CallInfo.create());
} | java |
@SafeVarargs
public static void truncate(Table... tables) {
foreach(tables, DBSetup::truncate, CallInfo.create());
} | java |
@SafeVarargs
public static int execute(DB db, String sql, Object... args) {
return DBSetup.execute(CallInfo.create(), db, sql, args);
} | java |
@SafeVarargs
public static boolean changed(DataSource... dataSources) {
if (dataSources == null || dataSources.length == 0) {
throw new InvalidOperationException("No data sources specified");
}
for (DataSource ds : dataSources) {
if (ds.getDirtyStatus()) {
return true;
}
}
... | java |
public static void dump(DataSet data, PrintStream out) {
try (Log log = Log.create(out)) {
log.write(CallInfo.create(), data);
}
} | java |
public static void dump(DataSource dataSource, PrintStream out) {
try (Log log = Log.create(out)) {
log.write(CallInfo.create(), executeQuery(dataSource));
}
} | java |
private static <T> void foreach(T[] arguments, CallHandler<T> handler, CallInfo callInfo) {
if (arguments == null || arguments.length == 0) {
throw new InvalidOperationException("Empty or null array!");
}
for (T argument : arguments) {
handler.action(callInfo, argument);
}
} | java |
public String serviceName_reverse_POST(String serviceName, String reverse) throws IOException {
String qPath = "/hosting/reseller/{serviceName}/reverse";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "reverse", reverse);
String resp = exec(qP... | java |
public String serviceName_language_POST(String serviceName, OvhPleskLanguageTypeEnum language) throws IOException {
String qPath = "/hosting/reseller/{serviceName}/language";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "language", language);
... | java |
public OvhOvhId serviceName_vendor_ovhId_POST(String serviceName, OvhVendorObjectTypeEnum objectType, String vendorId) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/vendor/ovhId";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(... | java |
public OvhTask serviceName_task_taskId_changeMaintenanceExecutionDate_POST(String serviceName, Long taskId, Date executionDate) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/task/{taskId}/changeMaintenanceExecutionDate";
StringBuilder sb = path(qPath, serviceName, taskId);
HashMap<String, Obj... | java |
public OvhTask serviceName_vmEncryption_kms_kmsId_changeProperties_POST(String serviceName, Long kmsId, String description, String sslThumbprint) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/vmEncryption/kms/{kmsId}/changeProperties";
StringBuilder sb = path(qPath, serviceName, kmsId);
HashM... | java |
public OvhTask serviceName_user_userId_objectRight_POST(String serviceName, Long userId, Boolean propagate, OvhRightEnum right, OvhUserObjectRightTypeEnum type, String vmwareObjectId) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/user/{userId}/objectRight";
StringBuilder sb = path(qPath, servic... | java |
public OvhTask serviceName_user_userId_changeProperties_POST(String serviceName, Long userId, Boolean canManageIpFailOvers, Boolean canManageNetwork, Boolean canManageRights, String email, String firstName, Boolean fullAdminRo, String lastName, Boolean nsxRight, String phoneNumber, Boolean receiveAlerts, Boolean tokenV... | java |
public OvhTask serviceName_user_POST(String serviceName, Boolean canAddRessource, Boolean canManageRights, String email, Date expirationDate, String firstName, String lastName, String name, OvhNetworkRoleEnum networkRole, Boolean nsxRight, String password, String phoneNumber, Boolean receiveAlerts, OvhRightEnum right, ... | java |
public ArrayList<Long> serviceName_globalTasks_GET(String serviceName, Long datacenterId, Date endDate_from, Date endDate_to, Date executionDate_from, Date executionDate_to, Long filerId, Long hostId, Date lastModificationDate_from, Date lastModificationDate_to, String name, Long networkAccessId, Long orderId, Long par... | java |
public OvhTask serviceName_federation_activeDirectory_POST(String serviceName, String baseDnForGroups, String baseDnForUsers, String description, String domainAlias, String domainName, String ip, String password, String username) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/federation/activeDire... | java |
public OvhTask serviceName_federation_activeDirectory_activeDirectoryId_changeProperties_POST(String serviceName, Long activeDirectoryId, String description, String password, String username) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/federation/activeDirectory/{activeDirectoryId}/changeProper... | java |
public OvhTask serviceName_changeProperties_POST(String serviceName, String description, Boolean sslV3, OvhUserAccessPolicyEnum userAccessPolicy, Long userLimitConcurrentSession, OvhUserLogoutPolicyEnum userLogoutPolicy, Long userSessionTimeout) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/chang... | java |
public ArrayList<OvhIpDetails> serviceName_ip_network_details_GET(String serviceName, String network) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/ip/{network}/details";
StringBuilder sb = path(qPath, serviceName, network);
String resp = exec(qPath, "GET", sb.toString(), null);
return conv... | java |
public OvhTask serviceName_datacenter_POST(String serviceName, String commercialRangeName, String vrackName) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/datacenter";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "commerci... | java |
public net.minidev.ovh.api.dedicatedcloud.host.OvhHourlyConsumption serviceName_datacenter_datacenterId_host_hostId_hourlyConsumption_GET(String serviceName, Long datacenterId, Long hostId) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/host/{hostId}/hourlyConsumption";
... | java |
public ArrayList<OvhProfile> serviceName_datacenter_datacenterId_orderableFilerProfiles_GET(String serviceName, Long datacenterId) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/orderableFilerProfiles";
StringBuilder sb = path(qPath, serviceName, datacenterId);
String... | java |
public net.minidev.ovh.api.dedicatedcloud.disasterrecovery.OvhProfile serviceName_datacenter_datacenterId_disasterRecovery_zerto_state_POST(String serviceName, Long datacenterId) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/disasterRecovery/zerto/state";
StringBuilder... | java |
public OvhTask serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_configureVpn_POST(String serviceName, Long datacenterId, String preSharedKey, String remoteEndpointInternalIp, String remoteEndpointPublicIp, String remoteVraNetwork, String remoteZvmInternalIp) throws IOException {
String qPath = "/dedic... | java |
public OvhTask serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_enable_POST(String serviceName, Long datacenterId, String localVraNetwork, String ovhEndpointIp, String remoteVraNetwork) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/disasterRecovery/zertoS... | java |
public OvhTask serviceName_datacenter_datacenterId_vm_vmId_backupJob_restorePoints_restorePointId_restore_POST(String serviceName, Long datacenterId, Long vmId, Long restorePointId, Long filerId) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/restorePo... | java |
public OvhTask serviceName_datacenter_datacenterId_vm_vmId_backupJob_enable_POST(String serviceName, Long datacenterId, Long vmId, OvhBackupDaysEnum[] backupDays) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/enable";
StringBuilder sb = path(qPath, ... | java |
public OvhHourlyConsumption serviceName_datacenter_datacenterId_filer_filerId_hourlyConsumption_GET(String serviceName, Long datacenterId, Long filerId) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/filer/{filerId}/hourlyConsumption";
StringBuilder sb = path(qPath, ser... | java |
public ArrayList<net.minidev.ovh.api.dedicatedcloud.host.OvhProfile> serviceName_datacenter_datacenterId_orderableHostProfiles_GET(String serviceName, Long datacenterId) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/orderableHostProfiles";
StringBuilder sb = path(qPath... | java |
public OvhTask serviceName_datacenter_datacenterId_backup_changeProperties_POST(String serviceName, Long datacenterId, Boolean backupDurationInReport, OvhOfferTypeEnum backupOffer, Boolean backupSizeInReport, Boolean diskSizeInReport, Boolean fullDayInReport, String mailAddress, Boolean restorePointInReport, Date sched... | java |
public OvhTask serviceName_datacenter_datacenterId_backup_enable_POST(String serviceName, Long datacenterId, OvhOfferTypeEnum backupOffer) throws IOException {
String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/enable";
StringBuilder sb = path(qPath, serviceName, datacenterId);
HashMap... | java |
public ArrayList<OvhZpoolStockProfile> location_pccZone_stock_zpool_GET(String pccZone, String profileFilter) throws IOException {
String qPath = "/dedicatedCloud/location/{pccZone}/stock/zpool";
StringBuilder sb = path(qPath, pccZone);
query(sb, "profileFilter", profileFilter);
String resp = exec(qPath, "GET",... | java |
public ArrayList<OvhHostStockProfile> location_pccZone_stock_host_GET(String pccZone, Long minYear) throws IOException {
String qPath = "/dedicatedCloud/location/{pccZone}/stock/host";
StringBuilder sb = path(qPath, pccZone);
query(sb, "minYear", minYear);
String resp = exec(qPath, "GET", sb.toString(), null);
... | java |
public ArrayList<OvhPccStockProfile> location_pccZone_stock_pcc_GET(String pccZone) throws IOException {
String qPath = "/dedicatedCloud/location/{pccZone}/stock/pcc";
StringBuilder sb = path(qPath, pccZone);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, t9);
} | java |
public void tickets_ticketId_reply_POST(Long ticketId, String body) throws IOException {
String qPath = "/support/tickets/{ticketId}/reply";
StringBuilder sb = path(qPath, ticketId);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "body", body);
exec(qPath, "POST", sb.toString(), o);
} | java |
public Boolean tickets_ticketId_canBeScored_GET(Long ticketId) throws IOException {
String qPath = "/support/tickets/{ticketId}/canBeScored";
StringBuilder sb = path(qPath, ticketId);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, Boolean.class);
} | java |
public ArrayList<OvhMessage> tickets_ticketId_messages_GET(Long ticketId) throws IOException {
String qPath = "/support/tickets/{ticketId}/messages";
StringBuilder sb = path(qPath, ticketId);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, t1);
} | java |
public void tickets_ticketId_score_POST(Long ticketId, String score, String scoreComment) throws IOException {
String qPath = "/support/tickets/{ticketId}/score";
StringBuilder sb = path(qPath, ticketId);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "score", score);
addBody(o, "scoreCo... | java |
public ArrayList<Long> tickets_GET(Boolean archived, OvhTicketCategoryEnum category, Date maxCreationDate, Date minCreationDate, OvhTicketProductEnum product, String serviceName, OvhTicketStatusEnum status, String subject, String ticketNumber) throws IOException {
String qPath = "/support/tickets";
StringBuilder sb... | java |
public OvhNewMessageInfo tickets_create_POST(String body, OvhTicketCategoryEnum category, OvhTicketProductEnum product, String serviceName, OvhTicketSubCategoryEnum subcategory, String subject, OvhTicketTypeEnum type) throws IOException {
String qPath = "/support/tickets/create";
StringBuilder sb = path(qPath);
H... | java |
@SafeVarargs
public final TableBuilder columns(String... columns) {
if (columns == null || columns.length == 0) {
throw new InvalidOperationException("Columns array is null or empty.");
}
if (tableColumns != null) {
throw new InvalidOperationException("The table columns are already defined.");... | java |
@SafeVarargs
public final TableBuilder key(String... columns) {
if (columns == null || columns.length == 0) {
throw new InvalidOperationException("Columns array is null or empty.");
}
if (keyColumns != null) {
throw new InvalidOperationException("The key columns are already defined.");
}
... | java |
public Table build(DB db) {
if (tableName == null) {
throw new InvalidOperationException("The table name has not been set.");
}
if (tableColumns == null) {
tableColumns = ALL_COLUMNS;
}
return new Table(CallInfo.create(), db, tableName, tableColumns, keyColumns);
} | java |
protected File gettmpStore(String nic) {
if (consumer_key_storage == null || !consumer_key_storage.isDirectory()) {
if (e1 == 0) {
e1++;
log.error(
"No cert directory, can not save consumer_key! please set `consumer_key_storage` variable to a valid directory in your {}, or in your environ variale OVH... | java |
public static void main(String[] args) throws IOException {
ApiOvhCore core = new ApiOvhCore();
ApiOvhCloud cloud = new ApiOvhCloud(core);
ArrayList<String> projects = cloud.project_GET();
for (String project: projects) {
System.out.println(project);
ArrayList<OvhNetwork> networds = cloud.project_serviceN... | java |
public void serviceName_task_taskId_cancel_POST(String serviceName, Long taskId) throws IOException {
String qPath = "/dedicated/housing/{serviceName}/task/{taskId}/cancel";
StringBuilder sb = path(qPath, serviceName, taskId);
exec(qPath, "POST", sb.toString(), null);
} | java |
public net.minidev.ovh.api.dedicated.server.OvhTask serviceName_features_backupFTP_POST(String serviceName) throws IOException {
String qPath = "/dedicated/housing/{serviceName}/features/backupFTP";
StringBuilder sb = path(qPath, serviceName);
String resp = exec(qPath, "POST", sb.toString(), null);
return conve... | java |
public String serviceName_PUT(String serviceName, OvhCrushTunablesEnum crushTunables, String label) throws IOException {
String qPath = "/dedicated/ceph/{serviceName}";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "crushTunables", crushTunable... | java |
public String serviceName_pool_POST(String serviceName, String poolName) throws IOException {
String qPath = "/dedicated/ceph/{serviceName}/pool";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "poolName", poolName);
String resp = exec(qPath, ... | java |
public String serviceName_user_userName_pool_PUT(String serviceName, String userName, Boolean classRead, Boolean classWrite, Boolean execute, String poolName, Boolean read, Boolean write) throws IOException {
String qPath = "/dedicated/ceph/{serviceName}/user/{userName}/pool";
StringBuilder sb = path(qPath, service... | java |
public String serviceName_acl_POST(String serviceName, String[] aclList) throws IOException {
String qPath = "/dedicated/ceph/{serviceName}/acl";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "aclList", aclList);
String resp = exec(qPath, "PO... | java |
public ArrayList<OvhTask> serviceName_backupRepository_inventoryName_upgradeQuota_POST(String serviceName, String inventoryName, Long newQuota) throws IOException {
String qPath = "/veeamCloudConnect/{serviceName}/backupRepository/{inventoryName}/upgradeQuota";
StringBuilder sb = path(qPath, serviceName, inventoryN... | java |
public OvhConsumption serviceName_consumption_GET(String serviceName, Long duration) throws IOException {
String qPath = "/metrics/{serviceName}/consumption";
StringBuilder sb = path(qPath, serviceName);
query(sb, "duration", duration);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(r... | java |
public OvhToken serviceName_token_tokenId_GET(String serviceName, String tokenId) throws IOException {
String qPath = "/metrics/{serviceName}/token/{tokenId}";
StringBuilder sb = path(qPath, serviceName, tokenId);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhToken.class);
} | java |
public OvhToken serviceName_token_tokenId_PUT(String serviceName, String tokenId, String description) throws IOException {
String qPath = "/metrics/{serviceName}/token/{tokenId}";
StringBuilder sb = path(qPath, serviceName, tokenId);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "descript... | java |
static void insert(CallInfo callInfo, DataSet data) {
Table table = asTable(data.getSource());
if (data.isEmpty()) {
throw new InvalidOperationException("Empty data set.");
}
table.setDirtyStatus(true);
doInsert(callInfo, table, data);
} | java |
static void populate(CallInfo callInfo, DataSet data) {
Table table = asTable(data.getSource());
table.setDirtyStatus(true);
doPopulate(callInfo, table, data);
} | java |
static void populateIfChanged(CallInfo callInfo, DataSet data) {
Table table = asTable(data.getSource());
if ( table.getDirtyStatus() ) {
table.setDirtyStatus(true);
doPopulate(callInfo, table, data);
}
} | java |
private static void doPopulate(CallInfo callInfo, Table table, DataSet data) {
doDeleteAll(callInfo, table);
doInsert(callInfo, table, data);
table.setSnapshot(data);
} | java |
private static void doInsert(CallInfo callInfo, Table table, DataSet data) {
StringBuilder sql = new StringBuilder("INSERT INTO ");
List<String> tableColumns = table.getColumns();
int columnCount = tableColumns.size();
int[] paramIdx = new int[columnCount];
int param = 0;
Iterator<String> itr = ... | java |
public static void update(CallInfo callInfo, DataSet data) {
Table table = asTable(data.getSource());
List<String> keyColumns = table.getKeyColumns();
if (keyColumns.isEmpty()) {
throw new InvalidOperationException("No key columns defined.");
}
List<String> tableColumns = table.getColum... | java |
public static void delete(CallInfo callInfo, DataSet data) {
Table table = asTable(data.getSource());
List<String> keyColumns = table.getKeyColumns();
if (keyColumns.isEmpty()) {
throw new InvalidOperationException("No key columns defined.");
}
List<String> tableColumns = table.getC... | java |
static int deleteAll(CallInfo callInfo, Table table) {
table.setDirtyStatus(true);
return doDeleteAll(callInfo, table);
} | java |
private static int doDeleteAll(CallInfo callInfo, Table table) {
DB db = table.getDB();
return db.access(callInfo, () -> {
String sql = DELETE_FROM_ + table.getName();
db.logSetup(callInfo, sql);
try (WrappedStatement ws = db.compile(sql)) {
return ws.getStatement().executeUpdate();
... | java |
static void truncate(CallInfo callInfo, Table table) {
final DB db = table.getDB();
db.access(callInfo, () -> {
String sql = "TRUNCATE TABLE " + table.getName();
table.setDirtyStatus(true);
db.logSetup(callInfo, sql);
try (WrappedStatement ws = db.compile(sql)) {
ws.getStateme... | java |
static int deleteAll(CallInfo callInfo, Table table, String where, Object... args) {
final DB db = table.getDB();
return db.access(callInfo, () -> {
table.setDirtyStatus(true);
String sql =
DELETE_FROM_ + table.getName() +
WHERE_ + where;
db.logSetup(callInfo, sql);
... | java |
static void drop(CallInfo callInfo, DB db, String tableName) {
String sql = String.format("DROP TABLE %s", tableName);
db.access(callInfo, () -> {
db.logSetup(callInfo, sql);
try (WrappedStatement ws = db.compile(sql)) {
PreparedStatement dropStmt = ws.getStatement();
dropStmt.execut... | java |
static int execute(CallInfo callInfo, DB db, String sql, Object[] args) {
return db.access(callInfo, () -> {
db.logSetup(callInfo, sql);
try (WrappedStatement ws = db.compile(sql)) {
PreparedStatement stmt = ws.getStatement();
if (args != null && args.length != 0) {
for (int i=... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.